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

Twitter: Universal Tag via DTM?

Avatar

Avatar
Validate 1
Level 2
paulinab5551861
Level 2

Likes

5 likes

Total Posts

17 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
paulinab5551861
Level 2

Likes

5 likes

Total Posts

17 posts

Correct Reply

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

24-06-2019

Hi!

Thanks for any help with this. We're doing a migration from GTM to DTM but I'm not familiar with how to set up Twitter Universal Tags.

In GTM, we have a pixel that fires in the Order Confirmation Page.

Agency sent over this type of tag:

<!-- Twitter universal website tag code -->

<script>

!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);

},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='//static.ads-twitter.com/uwt.js',

a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))}(window,document,'script');

// Insert Twitter Pixel ID and Standard Event data below

twq('init','ABCD');

twq('track','PageView');

</script>

<!-- End Twitter universal website tag code -->

yet my predecessor set the tag in GTM as like below (on a PAGE LOAD RULE😞

1778868_pastedImage_0.png

Would anyone be able to help me on setting this type of pixel up? and/or clarifying how the best way to port this over to DTM could be?

Since rule ordering isn't available in DTM - wondering what the best method could be.

I'm thinking it's something along like:

<!-- Twitter universal website tag code -->

<script>

!function(e,t,n,s,u,a){e.twq||(s=e.twq=function(){s.exe?s.exe.apply(s,arguments):s.queue.push(arguments);

},s.version='1.1',s.queue=[],u=t.createElement(n),u.async=!0,u.src='//static.ads-twitter.com/uwt.js',

a=t.getElementsByTagName(n)[0],a.parentNode.insertBefore(u,a))

}(window,document,'script');

// Insert Twitter Pixel ID and Standard Event data below

twq('init','ABCD');

twq('track','PageView')

twq('track','Purchase',

{

value: DigitalData.Revenue,

currency: 'CAD',

content_name: DigitalData.x,

num_items: DigitalData.Quantity,

content_type: .DigitalData.ProductQuantity,

});

}

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 3
Level 2
zaned72942122
Level 2

Likes

3 likes

Total Posts

5 posts

Correct Reply

3 solutions
Top badges earned
Boost 3
Boost 1
Affirm 3
Affirm 1
View profile

Avatar
Boost 3
Level 2
zaned72942122
Level 2

Likes

3 likes

Total Posts

5 posts

Correct Reply

3 solutions
Top badges earned
Boost 3
Boost 1
Affirm 3
Affirm 1
View profile
zaned72942122
Level 2

09-07-2019

Ideally, you should already have an event based rule or a direct call rule setup for the order confirmation, where all of the data concerning the transaction is readable.  Price point, the list of products, shipping price, whatever...  

Assuming you already have such a rule setup this way, you would just add it as a third party script, just as you have it in your post.  If you want to keep the <script> tag, then use Sequential HTML on Bottom of Page, but I recommend using Sequential JavaScript loaded on Bottom of Page so your tag gets executed at the point all of the transaction information should be available.  Otherwise, you may risk sending the pixel through without the DigitalData values.

As long as DTM is setup properly on the page, then you could theoretically get away with using any kind of rule.  I highly discourage the use of page load rules for order confirmation tags, though.  An order confirmation is an event that should be treated delicately and independently as not to confuse it with just another page (or a refresh of the order confirmation page).  Just make sure you have the include in the <head> and the _satellite.pageBottom() call in its own <script> tag just above the </body> tag.

Answers (0)