We have performed the OptIn implementation on the website(Cookies are managed in OneTrust). We have noticed a strange behavior.
User accepts all cookies consent on OneTrust banner -> ECID cookies(AMCV and AMCVS) got created and the tag was sent correctly (with all parameters along with MID).
Now, when the user navigates to other pages of the website and the tags are not sent correctly - fewer parameters with FID. I can see that an extra cookie gets created (s_fid).
Also, one more change was noticed, there was a 302 redirect(initiated via appmeasurement.js) and the next call is OK (status 200) containing FID and fewer parameters are sent.
Also, when I run adobe.optIn.permissions in the browser console, I can see that permissions are correct.
Since MID is present and ECID cookies are there, tags should contain all relevant data and tags should be sent with MID and not FID. But, this is not the case. This is happening on the website, whenever customer opts in for analytical cookies (ECID is true).
The existing implementation -
I have used the below code for OptIn
Case A: When customer opts In for analytical cookies
adobe.optIn.approve(adobe.OptInCategories.ANALYTICS, true);
adobe.optIn.approve(adobe.OptInCategories.ECID, true);
adobe.optIn.complete();
Case B: When the customer doesn't Opt for analytical cookies
adobe.optIn.approve(adobe.OptInCategories.ANALYTICS, true);
adobe.optIn.deny(adobe.OptInCategories.ECID, true);
adobe.optIn.complete();
Issue persists only with Case A, When the customer provides consent - tags are sent correctly. Only when there are page refreshes OR page navigation, tags are sent with FID.
Case B works fine all the time.
Any pointers will be helpful.
__PRESENT
__PRESENT