1

We have multisite setup on Sitecore, example www.MainsiteA.com and www.MainsiteB.com, We have installed FXM beacon javascript code into couple of external sites, Both external sites are on sub-domain of the main sites:

  1. book.MainsiteA.com
  2. book.MainsiteB.com

My expectation that a user visiting www.MainsiteA.com then visits book.MainsiteA.com would have the same contact id, Same for www.MainsiteB.com and book.MainsiteB.com.

The issue we are seeing that one of the external sites does not create sc_ext_contact cookie that holds the contact id of the visitor, while the other site is creating that cookie fine.

We need this cookie as we are collecting information about the user on the external sites and we need to merge that into the same contact in xDB at later stage, we would use the contact Id stored in the sc_ext_contact cookie.

Would there be any restrictions that could prevent FXM from creating the Cookie on the external site?

Thanks

  • Did you find any answers for this? – Nil Pun May 19 '18 at 14:24
  • @NilPun i posted the answer below, this was unique to an issue on the external site, but maybe it would give you an idea where to look for – Ahmed Okour May 19 '18 at 18:00
2

We are able to fix this issue, though it was unique to our case, i thought it might be helpful to others who might have this problem.

In FXM js code, the following code tries to set the sc_ext_contact cookie:

cookies.set(extCookieName, resp.ContactId, { expires: new Date(Date.parse(e.ContactExpires)), path: '/' }); 

the Date.parse(e.ContactExpires) method was always returning null resulting in the cookie never being created, This was caused by custom js extension on the external site for the Date class that was not parsing the date format that sitecore was returning correctly, After accounting for that date format in the external site, the cookie was then created correctly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.