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

Access the datalayer from the Parent page level to Iframe level

Avatar

Avatar
Validate 1
Level 2
sundhara_m
Level 2

Likes

4 likes

Total Posts

14 posts

Correct Reply

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

Avatar
Validate 1
Level 2
sundhara_m
Level 2

Likes

4 likes

Total Posts

14 posts

Correct Reply

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

03-09-2018

Hi,

Actually I have a data layer set in the parent page, from which I have created the data elements in the DTM webproperty. Also I am using those data elements in the Direct call Tag which is currently getting invoked from the Iframe page. The Iframe page was not able to access the data layer values as it was defined in the parent page.

Can anyone suggest a way to access the dataelements/ datalayer from the Parent page level to Iframe level?

Thanks in Advance!

Sundhara M.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
Employee
Gigazelle
Employee

Likes

468 likes

Total Posts

1,947 posts

Correct Reply

739 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile

Avatar
Coach
Employee
Gigazelle
Employee

Likes

468 likes

Total Posts

1,947 posts

Correct Reply

739 solutions
Top badges earned
Coach
Contributor 2
Validate 1
Ignite 80
Ignite 70
View profile
Gigazelle
Employee

14-09-2018

If you can access them via the browser console, you can access them in DTM. Try accessing the data layer from the console using some suggestions off of StackOverflow:

How to access parent Iframe from JavaScript - Stack Overflow

Once you're able to access the data layer from within the iframe via console, you can use that code to assign data elements.

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 2
ltaparia
Level 2

Likes

5 likes

Total Posts

29 posts

Correct Reply

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

Avatar
Validate 1
Level 2
ltaparia
Level 2

Likes

5 likes

Total Posts

29 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Give Back
Boost 5
Boost 3
Boost 1
View profile
ltaparia
Level 2

28-03-2019

Hi, Can I have straight answer on how to get access of data elements in to iFrame created by DTM (Non Sequential HTML) script? Above answer won't make much sense to me.

Regards