Expand my Community achievements bar.

Help shape the future of AI assistance by participating in this quick card sorting activity. Your input will help create a more effective system that better serves your needs and those of your colleagues.

Passing MID from App to Website

Avatar

Level 2

I am having an issue right now where when a user goes from the app to a page on my site, the marketing cloud id is not shared between the two and I am getting a duplicate visitor counts. It is also preventing me from seeing the whole customer journey as one visit.

I found this ID Service configuration setting in the documentation, but it doesn't appear to be working: overwriteCrossDomainMCIDAndAID

https://marketing.adobe.com/resources/help/en_US/mcvid/mcvid-overwrite-visitor-id.html 

Does anyone have any experience with this situation or this configuration setting. I am at a loss as to why it isn't working.

For the record, my site is using the most up-to-date version (2.3) of the Marketing Cloud ID Service and most up-to-date version (2.2) of AppMeasurement.

10 Replies

Avatar

Level 10

You'll want to use the appendToURL method for this scenario. This will allow you to pass the variables to the page from the app.

Avatar

Level 2

I appreciate the response Jantzen.

Just so I am clear on this and hopefully others in the future... the following use cases are true for using these methods and configurations. 

Let's assume all my links out to a webpage from my app are using the appendToUrl method and contain the necessary query parameters (mid, region, org id, etc.).

  • If the user has never visited the web page before, then the MID is automatically set with the one in the query parameter.

  • If the user has visited the web page before, then it will use the web page MID that is currently saved in the cookie, even if the query parameter is passed in the URL.

  • If the user has visited the web page before and overwriteCrossDomainMCIDAndAID is set to true on the Visitor ID service, then the MID is automatically set with the one in the query parameter.

Are all three of those scenarios correct?

Avatar

Level 10

To clarify, is your app a hybrid app with webviews built in or is the app presenting links that will open the page in the phone's browser?

Avatar

Level 2

The app has both... there are webviews and links to open a page in the browser.

Avatar

Level 10

With webviews, you cannot have viewed the page before being in the app (unless you set up the SDK in an app upgrade). So for that scenario are we talking links out to the browser or are we talking about an SDK upgrade to an existing app?

Avatar

Level 2

Sorry, yes you are correct in regards to the webview.

Let's just say those three scenarios are just for when users go from app to a browser webpage.

Avatar

Level 10

Alright, with that assumption:

  • If the user has never visited the web page before, then the MID is automatically set with the one in the query parameter.
    • This is correct, the page would pick the MID from the URL and use it. Depending on your needs, this might not be desirable though. Using an "mid" generated from a mobile app limits your ability to use the integrations an Audience Manager data in the future for that visitor.

  • If the user has visited the web page before, then it will use the web page MID that is currently saved in the cookie, even if the query parameter is passed in the URL.
    • It's my understanding that if an MID is passed in the URL it will be used regardless of what's already on the page. You'd want to test this in a staging environment to be sure though. You may be correct though as overwriting the "mid" would cause that visitor to be effectively cliffed.

  • If the user has visited the web page before and overwriteCrossDomainMCIDAndAID is set to true on the Visitor ID service, then the MID is automatically set with the one in the query parameter.
    • I'm not super familiar with the overwrite function. Based on the documentation, it sounds like your second and third scenarios would be correct but you'd want to test them to be sure.

Avatar

Level 2

I appreciate your help Jantzen.

We have sorted everything out and are going to use the appendToURL method and overwriteCrossDomainMCIDAndAID configuration. We were able to validate that it was working on our end.

One question about your last response... you said this:

Using an "mid" generated from a mobile app limits your ability to use the integrations an Audience Manager data in the future for that visitor.

I'm not sure what you mean by this. Can you provide a link to the documentation if it exists, where I can read up on it more?

Avatar

Level 10

I don't have a link to any documentation since it's a pretty deep topic. I'll add it as a perspective topic for a future knowledge base article.

With that said, it has to do with the way the Marketing Cloud ID is generated on mobile vs how it is generated on the web. On the web, the Marketing Cloud ID is generated using your Organization ID and the UUID value (learn more on a video I produced here). That UUID value is tied back to your company's Experience Cloud and/or AAM instance. The Integrations and Core Services like Audiences, A4T, Triggers, ect all need MIDs that were generated by a UUID to work properly.

On mobile, there are no browser cookies for the UUID to be stored in so a device specific ID is used in it's place. Unfortunately, this means that the integrations won't work as expected.

Hopefully, this gives you a good idea of what your getting into. Let me know if you have additional questions.

Thanks,
Jantzen

Avatar

Level 10

Hi Patrick,

Did these responses answer your original question? If so, is there one you think best answered the question that we can mark correct?

Thanks,
Jantzen