Google Remarketing code not working in DTM

Avatar

Avatar
Validate 1
Level 2
nicola_tincknel
Level 2

Likes

6 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
nicola_tincknel
Level 2

Likes

6 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 5
Boost 3
Boost 1
View profile
nicola_tincknel
Level 2

15-10-2015

Hi,

 

I have implemented the following third party code into page load rules in DTM:

<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 971225648;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/971225648/?value=0&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

It only recognises it as Non-Sequential HTML, however.

When debugging the site, it show's up as red and an unhappy face so I'm assuming it's not working. (sorry I'm new to this!)

 

Any advise would be hugely appreciated.

 

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile

Avatar
Validate 10
Level 10
ParitMittal
Level 10

Likes

93 likes

Total Posts

817 posts

Correct reply

349 solutions
Top badges earned
Validate 10
Validate 1
Boost 50
Boost 5
Boost 3
View profile
ParitMittal
Level 10

30-08-2016

Hi Al,

It should be very do-able.

it is notable that they have different code is you want to deploy it async

instead of "//www.googleadservices.com/pagead/conversion.js" you have to call "//www.googleadservices.com/pagead/conversion_async.js"

and then do some magic to make sure that file loads before you reference it

Please add the following code "Non Sequential JS" Third Party Tag

var dcJS = document.createElement('SCRIPT'); var done = false; dcJS.setAttribute('src', '//www.googleadservices.com/pagead/conversion_async.js'); dcJS.setAttribute('type','text/javascript'); document.body.appendChild(dcJS); dcJS.onload = dcJS.onreadystatechange = function () { if(!done && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete")) { done = true; callback(); // Handle memory leak in IE dcJS.onload = dcJS.onreadystatechange = null; document.body.removeChild(dcJS); } }; function callback(){ if(done){ /* <![CDATA[ */ window.google_trackConversion({ google_conversion_id : XXXXXXX, google_custom_params : window.google_tag_params, google_remarketing_only : true }); //]]> } }

Thanks & Regards

Parit Mittal

Answers (8)

Answers (8)

Avatar

Avatar
Validate 1
Level 1
ald42885741
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
ald42885741
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
ald42885741
Level 1

01-09-2016

Thanks Parit. This solutions seems to be working well.

Avatar

Avatar
Validate 1
Level 1
ald42885741
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
ald42885741
Level 1

Likes

0 likes

Total Posts

6 posts

Correct reply

0 solutions
Top badges earned
Validate 1
View profile
ald42885741
Level 1

30-08-2016

I am also having the same issue. Did anyone get the Google Remarketing tag to play nicely with Adobe DTM? Or is the conclusion that Google Remarketing tag should be implemented separately outside of DTM?

Thanks,

Al

Avatar

Avatar
Validate 1
Level 2
Ron_Coffman_102
Level 2

Likes

5 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
Ron_Coffman_102
Level 2

Likes

5 likes

Total Posts

4 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 1
View profile
Ron_Coffman_102
Level 2

23-10-2015

Hi Nicola and Rahsing, I'm having the same issue, did you ever solve the problem?

Thanks,

Ron

Avatar

Avatar
Give Back 50
Level 6
Rahsing
Level 6

Likes

17 likes

Total Posts

368 posts

Correct reply

132 solutions
Top badges earned
Give Back 50
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Give Back 50
Level 6
Rahsing
Level 6

Likes

17 likes

Total Posts

368 posts

Correct reply

132 solutions
Top badges earned
Give Back 50
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
Rahsing
Level 6

15-10-2015

Thanks! I can see them now. Let me look at it and get back to you.

Just as a first point of check, shouldn't you be commenting out the text on line 13?

just put '/*' before the line and '*/' after it and check if that works.

Kindly revert if the problem persists (I'll look to see if I can find anything else).

Regards

Rahul

Avatar

Avatar
Validate 1
Level 2
nicola_tincknel
Level 2

Likes

6 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
nicola_tincknel
Level 2

Likes

6 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 5
Boost 3
Boost 1
View profile
nicola_tincknel
Level 2

15-10-2015

I've popped them into a google doc (https://docs.google.com/document/d/17B7k8KfadDGSUDHoC1aaaZzems9uUu7NKynjr2kaKYA/edit?usp=sharing)

Can you see them on there?

 

Thanks so much for having a look- really appreciate 🙂

 

Nicola

Avatar

Avatar
Give Back 50
Level 6
Rahsing
Level 6

Likes

17 likes

Total Posts

368 posts

Correct reply

132 solutions
Top badges earned
Give Back 50
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Give Back 50
Level 6
Rahsing
Level 6

Likes

17 likes

Total Posts

368 posts

Correct reply

132 solutions
Top badges earned
Give Back 50
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
Rahsing
Level 6

15-10-2015

Hi Nicola,

I can't see the images. Could you try uploading them again please?

Regards

Rahul

Avatar

Avatar
Validate 1
Level 2
nicola_tincknel
Level 2

Likes

6 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 5
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
nicola_tincknel
Level 2

Likes

6 likes

Total Posts

9 posts

Correct reply

0 solutions
Top badges earned
Validate 1
Ignite 1
Boost 5
Boost 3
Boost 1
View profile
nicola_tincknel
Level 2

15-10-2015

Here's the screenshot of the error, it suggests there's a missing <script> tag.

 

Displaying image.png

 

 

Inline images 2

 

 

And this is a screen shot of the rule I've set up in DTM:

 

Displaying image.png

and this is the error i see when trying to change it to java-script:

Displaying image.png

 

Thanks

Nicola

Avatar

Avatar
Give Back 50
Level 6
Rahsing
Level 6

Likes

17 likes

Total Posts

368 posts

Correct reply

132 solutions
Top badges earned
Give Back 50
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile

Avatar
Give Back 50
Level 6
Rahsing
Level 6

Likes

17 likes

Total Posts

368 posts

Correct reply

132 solutions
Top badges earned
Give Back 50
Give Back 25
Give Back 10
Give Back 5
Give Back 3
View profile
Rahsing
Level 6

15-10-2015

Hi Nickola,

Could you paste screenshots of the error on your console and your page load rule setup?

Regards

Rahul