Iframe and main page unique visitor | Community
Skip to main content
March 7, 2024
Solved

Iframe and main page unique visitor

  • March 7, 2024
  • 1 reply
  • 1580 views

Hi Adobe experts,

 

I have a question regarding unique page visitors.

 

Scenario:

I have a website and it has an iframe. On page load, the unique visitor has a value of "new". However, when I interacted with the form, the unique visitor became "new" as well where it should be "repeat". 

 

Here is my setup for the Marketing Cloud:

Note that the MCID for both iframe and main page are already the same.

 

The code below was also added on Adobe Analytics extension to capture the New Repeat Visits

s.eVar12 = s.getNewRepeat(90);

 

Question:

Is there any setup or suggestion that you can give me so the iframe will have "repeat" value without hardcoding them? I already used Common Analytics plugin before but it did not work as well

 

Thanks in advanced!

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aa_from_savoy

Hi @aa_from_savoy 

Good day!

 

The unique visitor has a value of "new" on the first visit then when there's a form interaction it should be "repeat"

 

I have already tried following what's on this tutorial(https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/getnewrepeat.html?lang=en) however, this does not work as well.

 

The code below was also added on Adobe Analytics extension to capture the New Repeat Visits

s.eVar12 = s.getNewRepeat(90);

 

Thank you!


Hi @kimpeeey, thanks for the details.

 

As mentioned in the documentation: 

This function returns the value of "New" if the cookie set by the plug-in doesn’t exist or has expired. It returns the value of "Repeat" if the cookie set by the plug-in exists and the amount of time since the current hit and the time set in the cookie is greater than 30 minutes. This function returns the same value for an entire visit.

 

If:

  • it's the first visit of the visitor
  • the time between the landing page and the form page is less than 30 mins, the plugin will always return "New"

Bear in mind also that you have an iframe, so the domain of the landing page and the form (included via iframe) probably are different. Therefore, the cookie set by getNewRepeat() in the home page is written on mydomain.com, and is not accessible by the domain of the form (anotherdomain.com). This means that, when the iframe is rendered, the cookie in anotherdomain.com is not presented, and therefore is labeled as "New", as per documentation.

 

 

If you want a different behaviour you need to implement something custom, or use other variables available out of the box.

 

Hope this helps.

 

Best

 

1 reply

Adobe Employee
March 7, 2024

Hi @kimpeeey ,

where do you see the value "new" and "repeat"? It's a custom variable or something out-of-the-box?

kimpeeeyAuthor
March 7, 2024

Hi @aa_from_savoy 

 

Good day!

 

We assigned 1 variable to capture this value(evar12).

 

Thank you.

kimpeeeyAuthor
March 8, 2024

And how the value is calculated? Are you using the getNewRepeat plugin (https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/getnewrepeat.html?lang=en) ?


Hi @aa_from_savoy 

Good day!

 

The unique visitor has a value of "new" on the first visit then when there's a form interaction it should be "repeat"

 

I have already tried following what's on this tutorial(https://experienceleague.adobe.com/docs/analytics/implementation/vars/plugins/getnewrepeat.html?lang=en) however, this does not work as well.

 

The code below was also added on Adobe Analytics extension to capture the New Repeat Visits

s.eVar12 = s.getNewRepeat(90);

 

Thank you!