Implement click event on iFrame

Avatar

Avatar
Validate 1
Level 4
LeoS_Taco
Level 4

Likes

63 likes

Total Posts

25 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 4
LeoS_Taco
Level 4

Likes

63 likes

Total Posts

25 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
LeoS_Taco
Level 4

19-01-2018

Hello there, I have an iFrame on a page and I'd like to fire a click event when a user clicks on the iframe. I don't really care about putting DTM code on the iframe, I just want to fire a click event when someone simply clicks on the container div itself. I've built a rule and applied every bubbling condition and element classname possible and the most I got was a rule-fire on the very edge of the container. Does anyone know how or why this is?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 1
Level 1
appuriabhi
Level 1

Like

1 like

Total Posts

4 posts

Correct reply

2 solutions
Top badges earned
Boost 1
Affirm 1
View profile

Avatar
Boost 1
Level 1
appuriabhi
Level 1

Like

1 like

Total Posts

4 posts

Correct reply

2 solutions
Top badges earned
Boost 1
Affirm 1
View profile
appuriabhi
Level 1

23-01-2018

Hi LeoS_Taco - I don't think we can track clicks on IFRAME embedded and referring to third party domains, however if it was hosted on same domain and you'don't want to add DTM library - you can use window.postMessage API for the same to set direct call rules.

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 4
LeoS_Taco
Level 4

Likes

63 likes

Total Posts

25 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 1
Level 4
LeoS_Taco
Level 4

Likes

63 likes

Total Posts

25 posts

Correct reply

1 solution
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 25
View profile
LeoS_Taco
Level 4

22-01-2018

No it's a Facebook widget, so it just has a Facebook posts on it.

Avatar

Avatar
Contributor
MVP
joshd7227840
MVP

Likes

275 likes

Total Posts

241 posts

Correct reply

70 solutions
Top badges earned
Contributor
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile

Avatar
Contributor
MVP
joshd7227840
MVP

Likes

275 likes

Total Posts

241 posts

Correct reply

70 solutions
Top badges earned
Contributor
Give Back 10
Give Back 5
Give Back 3
Give Back
View profile
joshd7227840
MVP

20-01-2018

Is the iframe hosted on the same domain as the parent page?