Closed giovaniortolani closed 7 months ago
Hello Giovani,
Thanks for reaching out.
There is no objective in place for CAPI tag to be replicating the Twitter Pixel functionality, they are two different things and there's even an official statement that CAPI can be used w/o the Pixel. So to address your particular points:
Cookie names is different intentionally not to interfere with the one set by the Pixel
CAPI only expects the click_id (twclid) as part of the payload, and not the other stuff that web pixel puts into a cookie so it would be redundant to set that information, give that we have a separate cookie as my previous point suggests.
@mrsnippy, great. Thank you so much for your comprehensive reply :)
https://github.com/stape-io/twitter-tag/blob/2084570a5cfce7bd6b25871ed3ced38ef3f9ed10/template.js#L89
The cookie name probably should be
_twclid
because the https://static.ads-twitter.com/uwt.js Twitter Client code uses_twclid
. Look forTWCLID_COOKIE_NAME
inside the code.What do you think?
Also, the Client code uses an object (it runs
JSON.stringify
andencodeURIComponent
before saving it as cookies) as the cookie value in the formatTo me, only the
twclid
inside the object is important here.Perhaps should the sGTM version also set the cookie as the Client code does?