Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

DCM implementation in DTM

VipulHiray
Level 1
Level 1

Hey all,

I am currently working for the first time setting up Google DCM tags. I tried pasting the DCM code as a Third party non-sequential JaveScript through Adobe DTM. The code I used is pasted below:

<!--

Start of DoubleClick Floodlight Tag: Please do not remove

Activity name of this tag: ABCD

URL of the webpage where the tag is expected to be placed: https://www.abcd.com.au/agegate/

This tag must be placed between the <body> and </body> tags, as close as possible to the opening tag.

Creation Date: 05/24/2018

-->

<script type="text/javascript">

var axel = Math.random() + "";

var a = axel * 10000000000000;

document.write('<iframe src="https://8573949.fls.doubleclick.net/activityi;src=1234567;type=abcd;cat=test_0;dc_lat=;dc_rdid=;tag_...' + a + '?" width="1" height="1" frameborder="0" style="display:none"></iframe>');

</script>

<noscript>

<iframe src="https://8573949.fls.doubleclick.net/activityi;src=1234567;type=abcd;cat=test_0;dc_lat=;dc_rdid=;tag_...?" width="1" height="1" frameborder="0" style="display:none"></iframe>

</noscript>

<!-- End of DoubleClick Floodlight Tag: Please do not remove -->

1. On trying to add this code straight into DTM, I am getting a few errors and the rule cannot be saved. Can anyone please advise the best approach of going about tweaking this code for successful DCM implementation? I have many more requests for DCM implementation and a best approach would help me or the devs tweak the codes for all requests.

2. If I want to set up this code only for a particular landing page, would the best way to go about it be selecting condition and specifying an include path that contains the desired landing page? This should do the job right, or is there any other steps to follow for successful implementation?

Any help would be greatly appreciated. Thanks! [Personal contact info removed - Mod]

1 Accepted Solution
jantzen_belliston-Adobe
Correct answer by
Community Manager
Community Manager

It looks like the tag provided by Google is actually an HTML tag. You'll notice the code has a "</script>" tag an other HTML tags within it. Straight Javascript tags do not contain HTML tags most of the time. Try adding the code to the sequential HTML section and having it fire at the top of the page. Alternatively, you could see if Google provides a pure Javascript tag.

As for limiting where this code fires, yes, you can use conditions to limit where the rule fires. Path is probably the easiest condition to do this with.

View solution in original post

5 Replies
jantzen_belliston-Adobe
Correct answer by
Community Manager
Community Manager

It looks like the tag provided by Google is actually an HTML tag. You'll notice the code has a "</script>" tag an other HTML tags within it. Straight Javascript tags do not contain HTML tags most of the time. Try adding the code to the sequential HTML section and having it fire at the top of the page. Alternatively, you could see if Google provides a pure Javascript tag.

As for limiting where this code fires, yes, you can use conditions to limit where the rule fires. Path is probably the easiest condition to do this with.

View solution in original post

haritikam738202
Level 3
Level 3

Jantzen.Belliston​ I dont see the option to place the DCM tag in DTM as sequential HTML in the "Event rule" , please see screenshot below:

Screen Shot 2018-08-06 at 2.45.39 PM.png

jantzen_belliston-Adobe
Community Manager
Community Manager

You are correct, event based rules do not allow for sequential HTML. Only page load rules allow that option. We typically try to stay away from sequential HTML anyway since it requires a document.write and Chrome has already started to show security warnings to users when document.write is used.

You can either place the code you have into a page load rule with conditions or see if the tag vendor can provide a pure javascript tag for you to use. My recommendation would be the latter.

haritikam738202
Level 3
Level 3

Sounds good! I've requested the vendor to provide pure Javascript tags.

Thank you for your insights, it definitely helps us

haritikam738202
Level 3
Level 3

May I ask the best practice in case the vendor does not provide a pure Javascript tag? Shall we then place it directly on the site instead of using tag manager?