issue with marketing channel attribution after upgrading to shopify checkout extensibility | Community
Skip to main content
Level 3
November 16, 2024
Solved

issue with marketing channel attribution after upgrading to shopify checkout extensibility

  • November 16, 2024
  • 1 reply
  • 2327 views

Howdy Adobe Community,

Is anyone experiencing issue with their Marketing channel attribution with shopify checkout extensibility?

We are noticing new session start in our marketing channel reporting when user proceeds to the order comfirmation page (checkout_completed). Most of our traffic are being attributed to "Direct" which is impacting our paid media campaign reporting.

 

Digging into the data I can see Visit number =1 and Hit Depth = 1 is showing as order confirmation 


We have VisitorID / ECID enabled on the site for cross domain tracking and this appears to be persisting when I tested in our staging environment but it appears that a new visitorid is getting regenerated when user completes an order which is distrupting the continuity of session tracking.

Any insights or assistance you can provide would be greatly appreciated as I can pin point what is going on.. as checkout extensibility is pretty much a sandbox.

Any one experiencing this and how did you go about resolving.. I have reached out to shopify and still waiting on a response.

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 Jennifer_Dungan

When you test your flow, can you check that the use is retaining the same ECID between your main site and your Shopify? While the ECID / Visitor ID service may be turned on, if the Shopify is potentially getting third party cookies, it may not be identifying the users as the same person (so new user, new session, etc).

 

Now, there is an appendVisitorIDsTo plugin (https://experienceleague.adobe.com/en/docs/id-service/using/id-service-api/methods/appendvisitorid) that you can add to append the visitor information to the Shopify link to pass the information about the user to the other site..

 

However, I have also seen many complaints here that the other site isn't using them (which I though was supposed to be a part of this plugin... I cannot confirm since I am not using this at this time. Maybe they only installed it on one side of the implementation...)

 

However, that said, you can create your own logic to force the ECID cookie based on the passed ECID in the URL which should compensate if it doesn't work out of the box.

1 reply

Jennifer_Dungan
Community Advisor and Adobe Champion
Jennifer_DunganCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
November 16, 2024

When you test your flow, can you check that the use is retaining the same ECID between your main site and your Shopify? While the ECID / Visitor ID service may be turned on, if the Shopify is potentially getting third party cookies, it may not be identifying the users as the same person (so new user, new session, etc).

 

Now, there is an appendVisitorIDsTo plugin (https://experienceleague.adobe.com/en/docs/id-service/using/id-service-api/methods/appendvisitorid) that you can add to append the visitor information to the Shopify link to pass the information about the user to the other site..

 

However, I have also seen many complaints here that the other site isn't using them (which I though was supposed to be a part of this plugin... I cannot confirm since I am not using this at this time. Maybe they only installed it on one side of the implementation...)

 

However, that said, you can create your own logic to force the ECID cookie based on the passed ECID in the URL which should compensate if it doesn't work out of the box.

keeTeeAuthor
Level 3
November 18, 2024

Thanks  for the quick response @jennifer_dungan I will go through the implementation and give you an update.. Question though, do I need to pull the updatedURL into an eVar for monitoring purposes?

keeTeeAuthor
Level 3
November 21, 2024

Yes, basically, here is what I would do:

 

1. Create a Data Element using Query String Parameter (and grabbed the passed ECID) - make sure this will default to no value if there is no passed ECID.

2. I would add a custom code rule that loads as soon as possible... maybe using the Library Loaded trigger, to ensure that the cookie is updated ASAP.

 

The code should look something like:

var newECID = _satellite.getVar('queryStringECID'); if (newECID){ var now = new Date(); var time = now.getTime(); var expireTime = time + 1000 * 60 * 60 * 24 * 730; now.setTime(expireTime); var cookieName = "s_ecid"; var cookieValue = "MCMID|" + newECID; cookieValue = encodeURIComponent(cookieValue); var cookieString = ""; cookieString = cookieName +'=' + cookieValue + ';expires=' + now.toGMTString() + ';path=/;domain=domain.com'; document.cookie = cookieString; }

 

First I grab the value of the Data Element into a variable "newECID", then I check IF I have a value (otherwise don't overwrite what is there... we don't want to accidentally clear the value).

 

Make sure to reference the name of your Data Element (I used "queryStringECID" as a sample), and make sure to change "domain.com" in the cookie string to the correct domain where your s_ecid cookie is set (so that you overwrite the cookie, and don't create a second one on a different domain variant)

 

 

While you could use:

var newECID = _satellite.getVar('queryStringECID'); if (newECID){ document.cookie = "s_ecid=MCMID%7C" + newECID; }

 

There is no guarantee this will set to the correct domain (particularly if your Shopify is using a subdomain, but the cookie is set to the main domain), so you might end up with two s_ecid cookies... but give it a try... it might work.

 

 

This should overwrite the ECID and now should send this visitor id on your tracking call, instead of the newly generated one... 


Hi @jennifer_dungan  quick update.. I am infact ending up with 2 ECIDs on the shopify site.. How do I overwrite as using the ECID overwritemcid variable doesnt seem to be working for me.. Should I try wrapping the code in the below perhaps.. ?

qq- WHAT

  1. var visitor = Visitor . getInstance ( "INSERT-MARKETING-CLOUD-ID-HERE" , {
  2. //Set overwrite property
  3. overwriteCrossDomainMCIDAndAID : true
  4. });