Hey guys! I’m having trouble tracking events on an iframe in our webflow page. Creating a custom attribute (like I did for e.g. buttons) doesn’t seem to work for the iframe.
Tracking inside an iframe requires the script to be installed inside the embedded page. JavaScript from outside the iframe won’t have access to it, they are completely separated websites.
Do you have access to “example.com”? In that case, add the tracking script and custom button tracking to it directly.
Or would you actually like to track clicks onto the iframe? I don’t know if it is possible to track click events on the
We’re using a Tally.so form, and we’d like to track klicks on a button in there. In that case we somehow would need to place the script within Tally and not in the iframe brackets?
Exactly. You would need to add it to Tally and probably also create a roll-up view.
What exactly are you trying to achieve? If it’s about tracking the successful form submission, I would recommend setting up a “thank you” page and adding the event there, making implementing this a lot easier.
We manged to implement it. Tally Pro allows for code injection. So we added our Tally sub-domain to Pirsch as an additional domain, added the general Pirsch snippet in Tally (on a domain level code injection) and then added the JavaScript Snippet into the code injection of that specific form.
Now when the button with the class “sc-bb5db573-1” gets klicked, an event is logged in Pirsch