indivi.lt Posted March 31, 2014 Share Posted March 31, 2014 Hi, did anyone try to updating GA script with display advertiser support? I need to know where I can find the GA code, so I could change a few lines there. Tried ganalytics.php, header.tpl - nothing. I'm not a developer, so I can't write custom scripts, I can only copy/paste them:) So if anyone had done this or know where I can find the GA modules inserted java script please let me know. Huge thanks, R. Link to comment Share on other sites More sharing options...
inweb Posted March 31, 2014 Share Posted March 31, 2014 What is the exact name of module you are using? What exactly do you want to add? Link to comment Share on other sites More sharing options...
indivi.lt Posted March 31, 2014 Author Share Posted March 31, 2014 I think its a standard GA module Google Analytics v1.4.1 for PrestaShop. To implement Remarketing, Demographics and Interests reporting, or GDN Impression Reporting, replace the bold text in this example: <script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-xxxxx-y']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script>with the bold text in the example below: <script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-xxxxx-y']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script> Above is the change I want to make to the tracking code, just one line. What is the exact name of module you are using? What exactly do you want to add? I think its a standard GA module Google Analytics v1.4.1 for PrestaShop. To implement Remarketing, Demographics and Interests reporting, or GDN Impression Reporting, replace the bold text in this example: <script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-xxxxx-y']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script>with the bold text in the example below: <script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-xxxxx-y']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script> Above is the change I want to make to the tracking code, just one line. Sorry, part of the snippet is gone: <script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-xxxxx-y']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script> with the bold text in the example below: <script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-xxxxx-y']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script> Link to comment Share on other sites More sharing options...
inweb Posted March 31, 2014 Share Posted March 31, 2014 Sorry maybe I'm blind but I did not get what do you want to actually add. Can you elaborate or better more simple & clear? Link to comment Share on other sites More sharing options...
indivi.lt Posted April 1, 2014 Author Share Posted April 1, 2014 Sorry maybe I'm blind but I did not get what do you want to actually add. Can you elaborate or better more simple & clear? For some reason this line that I want to change get's removed form the topic. Not sure why. I want to make a change to this line:ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; Heres the link for what I would like to do: https://support.google.com/analytics/answer/2444872?hl=en Hope it won't be removed Link to comment Share on other sites More sharing options...
inweb Posted April 1, 2014 Share Posted April 1, 2014 You can do so in modules/ganalytics/header.tpl file. Link to comment Share on other sites More sharing options...
indivi.lt Posted April 1, 2014 Author Share Posted April 1, 2014 You can do so in modules/ganalytics/header.tpl file. Awesome, thanks, I'm going to try it out. Link to comment Share on other sites More sharing options...
indivi.lt Posted April 1, 2014 Author Share Posted April 1, 2014 You can do so in modules/ganalytics/header.tpl file. I just tried it and on the page source it still shows the old code and analytics says that it cant find the change. Does the change take effect immidietely? And will it work on all pages? Link to comment Share on other sites More sharing options...
inweb Posted April 1, 2014 Share Posted April 1, 2014 You have to delete smarty cache - directories: tools/smarty/cache/ and tools/smarty/compile/ (applies to PS 1.4). Link to comment Share on other sites More sharing options...
indivi.lt Posted April 1, 2014 Author Share Posted April 1, 2014 You have to delete smarty cache - directories: tools/smarty/cache/ and tools/smarty/compile/ (applies to PS 1.4). Deleted the contents but still nothing, source shows old GA code Link to comment Share on other sites More sharing options...
inweb Posted April 2, 2014 Share Posted April 2, 2014 Make sure this file is also not placed in themes/<theme>/modules/ganalytics/ directory. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now