Shape 5

Wordpress Club Themes => Incline - Club => : maheshcha January 05, 2017, 04:10:42 AM



: Google Analytics script
: maheshcha January 05, 2017, 04:10:42 AM
Hi,
I am trying to load Google Analytics scripts at the bottom of the page using "Script To Be Appended To The Bottom Of Index.Php" field in the Theme option, but it fails to save the code. I copied/pasted following script -

:
<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-#########-1', 'auto');
  ga('send', 'pageview');

</script>

After I save the page and come back later on the page, the script is gone.

Did I do anything wrong here?

PS: I have moved the page to www.ethicaltravelportal.com from earlier demo site.

Thanks in advance for help.


: Re: Google Analytics script
: Tristan Rineer January 09, 2017, 12:49:13 PM
Is that the only thing that is failing to save in the theme options, or is it failing to save other changes that you make?

If it's not saving other settings either, then it's likely a permissions issue with the file that stores the settings.  If every other change is staying saved, then I'm not sure exactly what could be causing the issue.  However, there's a solution that is probably better than using the theme options anyway: Just place a Clean Markup widget in the Debug position with the code.


: Re: Google Analytics script
: maheshcha January 10, 2017, 01:40:58 AM
Thank you Tristan. Later solution worked - inserted Google Analytical script in Debug widget with Clean markup widget.
However, everything else is staying saved but "script appended" field.

One more small issue - "Enable custom 1 overlay" is not selectable to No option. I have worked around with CSS background: none to overcome the issue.

Thanks a tons.


: Re: Google Analytics script
: Tristan Rineer January 11, 2017, 02:14:59 PM
I'm not sure what you're referring to when you mention the overlay.  Is the setting not saving in the theme options?


: Re: Google Analytics script
: maheshcha January 13, 2017, 12:54:44 AM
I'm not sure what you're referring to when you mention the overlay.  Is the setting not saving in the theme options?

Hi, thanks for response, I was talking about one in the screenshot as in the attachment. I could not select NO to overlay, on the Chrome browser in both Windows 7 and MacOS Sierra. I click on the dropdown and move the mouse, the dropdown menu disappears.

Thank you


: Re: Google Analytics script
: Tristan Rineer January 13, 2017, 03:33:20 PM
Have you tried using another browser?  If the issue only happens in Chrome, then it may be a browser extension that is causing the problem.


: Re: Google Analytics script
: maheshcha January 16, 2017, 01:58:05 AM
Have you tried using another browser?  If the issue only happens in Chrome, then it may be a browser extension that is causing the problem.

I have tried in Win Firefox and MacOS Chrome & Safari...the problem is same.

Thanks


: Re: Google Analytics script
: Tristan Rineer January 16, 2017, 03:31:56 PM
Is that the only option in the admin that is having that problem?


: Re: Google Analytics script
: maheshcha January 17, 2017, 01:05:23 AM
Is that the only option in the admin that is having that problem?

Yes, so far I know.


: Re: Google Analytics script
: Tristan Rineer January 17, 2017, 01:38:20 PM
Have you installed the latest version of the Vertex Upgrade Patch (http://www.shape5.com/component/option,com_docman/Itemid,96/task,cat_view/gid,308/)?


The easiest way to make sure the patch is installed correctly is below:




===============
To install the patch:

1. Download the Vertex Upgrade Patch (http://www.shape5.com/component/option,com_docman/Itemid,96/task,cat_view/gid,308/).
2. Back up your site (just in case).
3. Copy the vertex/footer.php from the theme folder to somewhere safe (you'll be putting it back after patching).
4. Delete the vertex folder from the theme (nothing else, that is the only thing to delete).
5. Extract the zip file containing the patch, and upload it to the theme folder through FTP, choosing "overwrite" if/when prompted.
6. Copy the footer.php file (from step 3) back into the vertex folder of the theme.

That's it. 

Or, to put it a different way:
1. Back up vertex/footer.php. 
2. Delete the vertex folder, then upload the extracted patch to the theme folder. 
3. Put the footer.php file back into the vertex folder of the theme.
===============