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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

DTM: Non-Sequential HTML tag

Ridder_M
Level 2
Level 2

Hello,

I'm using a Non-Sequential HTML Javascript/Third Party tag, where I'm using the following script to pass data to a 3rd party tag.

<script>x = _satellite.getVar('Sub-Total');</script>

The problem that I have is that no data is passed to "x".

I have also tried the following:

<script>var x = $('td[data-hook="order_item_total"]').text().substring(1);</script>

In this case I'm getting $ is undefined. Note, both methods work when I test it in the Javascript console and if I use a Non-Sequential Javascript tag. What do I need to add to make either of these work? Your help is greatly appreciated.

Thanks,

Ridder

1 Accepted Solution
mikethompson
Correct answer by
Level 5
Level 5

Your non-sequential HTML tag is probably going into an iframe, so you might be seeing some issues around that.

For the first case, try referencing your variable as %Sub-Total% rather than using the getVar function.

View solution in original post

0 Replies
mikethompson
Correct answer by
Level 5
Level 5

Your non-sequential HTML tag is probably going into an iframe, so you might be seeing some issues around that.

For the first case, try referencing your variable as %Sub-Total% rather than using the getVar function.

View solution in original post