Analytics
5.6K members online now
Discuss discrepancies between AdWords and Google Analytics data, linking AdWords and Google Analytics, importing your goals/Ecommerce transactions into AdWords, and setting up Remarketing
 
Guide Me
star_border
Reply

Dynamic Remarketing with Adwords -> How push data from <body> to Analytics?

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi... i wand integrate dynamic remarketing in analytics for adwords. The problem is, i have the price information at first after the <body> tag. And the analytics code are in the header tag. How can i push the information for remarketing to analytics? I don't work with tag manager.

 

i have to be push this 3 IDs to analytics:

ga('set','ecomm_prodid',".$this->page_products_id.");
ga('set','ecomm_pagetype','".$this->page_type."');
ga('set','ecomm_totalvalue','".$this->page_totalvalue."');

 

thanks for your help

 

andy

1 Expert replyverified_user

Re: Dynamic Remarketing with Adwords -> How push data from <body> to Analytics?

Top Contributor
# 2
Top Contributor
Hi Andreas,

You need to move ga('send', 'pageview'); after the set commands. Also you need to create custom dimension for each attribute and set the values like ga('set','dimension1',".$this->page_products_id."); Please check the document below:

https://support.google.com/analytics/answer/3455600

Hope this helps.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Dynamic Remarketing with Adwords -> How push data from <body> to Analytics?

[ Edited ]
Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Arnold

Thanks for your feedback. I know the code have to be look like this.

&lt;script&gt;
(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','//www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-XXXXX-YY', 'auto'); // Google Analytics-Web-Property-ID einfügen, z. B. "UA-12345-1"
ga('set','dimension1','12345, 678910, 98765'); // Erforderlich, Wert der Produkt-ID, z. B. "12345" oder "67890"
ga('set','dimension2',’searchresults’); // Optional, Wert des Seitentyps, z. B. "home", "cart" oder "purchase"
ga('set','dimension3','99.95'); // Optional, Gesamtwert, z. B. "99.95", "5.00" oder "1500.00"
ga('send', 'pageview');

&lt;/script&gt;

But the problem is, my analytics snippet is in the <header> and the information for the price i have later in the <body>. So how i can send the data like dimension3, to analytics from the <body>. With the Google Tag Manger i can use the data layer to send the data to analytics. But i don't know, how it works with out GTM.

Re: Dynamic Remarketing with Adwords -> How push data from <body> to Analytics?

Top Contributor
# 4
Top Contributor
Hi,

You need to have an interaction hit after your set commands in order to get your custom definitions recorded in GA.
Basically the set command sets a field's value for the subsequent interaction hits.
If it's possible either move the ga('send', 'pageview'); command to appear after the set commands in the source, or set the fields for the pageview hit like:
ga('send', 'pageview', {
'dimension1': '12345, 678910, 98765',
'dimension2': 'searchresults',
'dimension3': '99.95'
});
Let me know if you have questions.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Dynamic Remarketing with Adwords -> How push data from <body> to Analytics?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭
Hi Arnold

Thanks.. musst i do any java script container or somes thing around your code?

Andy

Re: Dynamic Remarketing with Adwords -> How push data from <body> to Analytics?

Top Contributor
# 6
Top Contributor

Hi Andreas,

 

You need only the regular <script> </script> tags.

 

Let me know if you have more questions.


Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

Re: Dynamic Remarketing with Adwords -> How push data from <body> to Analytics?

Visitor ✭ ✭ ✭
# 7
Visitor ✭ ✭ ✭
Hi Arnold.. :-( it's don't work .. i have contact you by G+, i hope that's OK for you. I have you send you the URL. I hope you can take a look to see wheres the problem. Thank you very much for you help.