Expand my Community achievements bar.

Check out the 3rd Edition of the AEP Community Lens for all the latest releases, resources, and Community updates
SOLVED

Tracking iframe using Adobe Analytics

Avatar

Level 2

How should I setup the adobe analytics to capture data through iframe from webpages. I have already added the adobe launch script inside head tag, but the tracking is not working as expected. Any suggestions?

1 Accepted Solution

Avatar

Correct answer by
Level 4

To collect data from an iframe in Adobe Analytics, ensure that the Adobe Launch script is loaded in both the parent page and the iframe. Here's how to configure Adobe Analytics to collect data via iframes:

Add the following script to the parent page:

Make sure the Adobe Launch script is included in the parent page's head tag. When the parent page is loaded, the Adobe Analytics library will be loaded.

Add the Adobe Launch script to the iframe: The Adobe Launch script must also be added to the iframe. You may accomplish this by inserting the script into the iframe document's head tag.

<head>

    <script src="https://assets.adobedtm.com/launch-XXXXXXX-XXXXXXXXXXXXXXXXXXX.min.js" async></script>

</head>

Make sure to replace the XXXXXXX-XXXXXXXXXXXXXXXXXXX with your own Launch property ID.

Configure Adobe Launch: You must configure the Analytics extension in Adobe Launch to track data from the iframe. Follow these steps to accomplish this:

Navigate to the Analytics extension setup in Adobe Launch.

Make sure the "Load rules in iFrames" option is enabled in the "Tracking Library" section.

Make sure the "Send Beacon from iFrames" option is enabled in the "Code Configuration" section.

Save your modifications and then publish your Adobe Launch library.

Set up your Analytics tracking: You must configure your Analytics tracking to gather data from the iframe. You may accomplish this by configuring custom code in Adobe Launch or by using Adobe Launch extensions.

For example, if you want to track clicks on links inside the iframe, you may use Adobe Launch to create a custom code rule that searches for clicks on URLs inside the iframe and delivers an Analytics event when a click is found.

 

2 Replies

Avatar

Correct answer by
Level 4

To collect data from an iframe in Adobe Analytics, ensure that the Adobe Launch script is loaded in both the parent page and the iframe. Here's how to configure Adobe Analytics to collect data via iframes:

Add the following script to the parent page:

Make sure the Adobe Launch script is included in the parent page's head tag. When the parent page is loaded, the Adobe Analytics library will be loaded.

Add the Adobe Launch script to the iframe: The Adobe Launch script must also be added to the iframe. You may accomplish this by inserting the script into the iframe document's head tag.

<head>

    <script src="https://assets.adobedtm.com/launch-XXXXXXX-XXXXXXXXXXXXXXXXXXX.min.js" async></script>

</head>

Make sure to replace the XXXXXXX-XXXXXXXXXXXXXXXXXXX with your own Launch property ID.

Configure Adobe Launch: You must configure the Analytics extension in Adobe Launch to track data from the iframe. Follow these steps to accomplish this:

Navigate to the Analytics extension setup in Adobe Launch.

Make sure the "Load rules in iFrames" option is enabled in the "Tracking Library" section.

Make sure the "Send Beacon from iFrames" option is enabled in the "Code Configuration" section.

Save your modifications and then publish your Adobe Launch library.

Set up your Analytics tracking: You must configure your Analytics tracking to gather data from the iframe. You may accomplish this by configuring custom code in Adobe Launch or by using Adobe Launch extensions.

For example, if you want to track clicks on links inside the iframe, you may use Adobe Launch to create a custom code rule that searches for clicks on URLs inside the iframe and delivers an Analytics event when a click is found.