I am creating a website functionally similar to Google Analytics. I am not involved in analytics, but I am trying to provide either one javascript line or one iframe line, which will add functionality to other sites.
In particular, the embedded content will be a button that opens a new window and allows the user to perform some actions. In the end, the user will finish, and the window will close, and at that moment the button will be updated to a new element, indicating that the user has completed the stream.
A popup will download content from my site, but my question is about the javascript (or iframe) inline string. What is the best way to do this? Google Analytics and optimistically use javascript to change the homepage. Obviously, iFrame will work too.
I have a security problem: someone copies the embed code from one site and puts it in another. Each page / site combination that implements my script / iframe will have a unique identifier, which the site developers will generate from an authenticated account on my site. Then I provide them with the appropriate embed code.
My first thought was to simply use an iframe that loads the page from my site with url parameters specific to the page / site compilation. If I go along this route, is it possible to determine that the page only loads from an iframe embedded in a specific domain or url prefix? Could something like this be done using javascript?
I read this post , which was very useful, but my use case is a little different, since I'm actually going to open the content to users with whom I can interact. The competition is that the enemy of the site where my insertion is hosted is deceivingly tempting its users to use the widget. These users will believe that they interact with my site on behalf of an enemy site, but actually interact on behalf of a friendly site.
source share