iFrame Implementation
  • 16 Nov 2023
  • 1 Minute to read
  • Dark
    Light

iFrame Implementation

  • Dark
    Light

Article Summary

Summary

If the site operator uses an iFrame, a standard Jornaya implementation requires the Jornaya campaign code to first be implemented on the parent page of the iFrame, using the steps as outlined in our Web Form Implementation setup. Follow the instructions in our Getting Started Guide to implement the Jornaya javascript on the parent page of the iFrame.

To complete this implementation, you will need:

The following steps should be followed to complete the iFrame implementation:

The parent page should add the iFrame to the DOM or set the src attribute (location/address) of the iFrame through a designated callback function that gets called when Jornaya issues the LeadiD. This allows the issued Jornaya LeadiD to be passed in the querystring to the form in the iframe.

  1. Edit the campaign snippet on the parent page to call a callback function and pass in the issued Jornaya LeadiD once the script has run.
  2. Put the token in the URL querystring of the child iFrame.
  3. The page in the iFrame has the hidden input field named "leadid_token". Logic on the page sets the value of the hidden input field to the LeadiD token passed in the querystring of the iFrame.
  4. After the value of the hidden input field is set, the Jornaya javascript campaign code is added to the page. Use the same campaign code for the parent and child pages.
  5. The LeadiD token will then be present in the hidden input field, and that LeadiD will be used for the activity in the iFrame.

Once implemented, follow the steps in the Campaign Implementation Self Test to verify the implementation is working as expected.


Was this article helpful?