cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
4655members
1467posts
InvocaKnowledge
Community Manager
Community Manager

Applies To

Invoca Tag, iFrame

Answer

Unfortunately, there are certain limitations when swapping numbers within iFrames. 

Additional Information

What is an iFrame?
An iFrame (Inline Frame) is an HTML element that allows you to embed another webpage within the current website. Think of an iFrame as a mini-web page inside your main webpage. It lets you show content from another website right within your own. You might see iFrames used for:
- Videos (like YouTube clips)
- Maps (like Google Maps)
- Forms or payment systems from other companies

 

Limitations of Invoca Number Swapping in iFrames

iFrames introduce a layer of isolation that can prevent this process from working correctly.

Security Rules: 
Web browsers implement a security measure called the Same-Origin Policy. It's like saying, "You can only change things inside your own house, not inside someone else's house.". This policy restricts JavaScript code on one domain (your website) from accessing or modifying content from another domain (the iFrame's source).
If the content inside the iFrame comes from a different website than yours, the Invoca tag is not allowed to make changes.

iFrame Isolation:

iFrames create a separate browsing context. The Invoca tag running in the main window cannot directly manipulate the DOM (Document Object Model) of the iFrame unless they share the same origin.
Essentially the iFrame acts as a separate web page within a web page.

Third-Party Control:

In many cases, the content within an iFrame is controlled by a third party. You may not have the ability to modify the iFrame's source code or add the Invoca tag directly to it. This lack of control prevents Invoca from performing number swapping.

 

Possible Workarounds (Limited)
- If possible, contact the provider of the iFrame content and inquire about their support for dynamic number insertion or if they can add the Invoca tag to their iFrame.

One drawback is that there could be fragmented attribution as attribution that is cookied and captured on the main parent page would not be attributed to the number within the iFrame.


- Explore alternative integration methods that do not rely on iFrames, such as direct API integrations or embedding the content directly into your website's code (if allowed by the provider).
- If the number in the iframe is also present outside of the iframe, then the Invoca tag can swap that number on the main page.

 

Need more help?

Don't see what you are looking for? You can ask the Community or contact support.