Jump to content

Google Analytics Display Advertiser Support


indivi.lt

Recommended Posts

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

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...