We currently have implemented a new website flow using Salesforce Communites and Lightning. The problem with Salesforce is they only allow you to inject the DTM header via an Iframe. They do not allow for the DTM header to be loaded directly on the main html page itself due to Content Security concerns. So we have created an iframe element with the src as the DTM header.
This iframe executes our DTM rules on each page however I have no access to any of the elements on the parent page in which the iframe is hosted. Therefore I have no way to grab the buttons to generate click event, etc. In the Development tools via chrome I can grab these elements via parent.document.getElementById but from DTM it does not seem that I am able to grab these and that the parent object is not defined.
Is there a way to grab the parent page elements from our iframe implementation of DTM? Is this even possible without the DTM header being on both the main page and the iframe?