Hello everyone. I have implemented the Mixpanel tr...
# questions
b
Hello everyone. I have implemented the Mixpanel tracking in connection with the Consent tool(3rd party service) + GTM (Google Tag Manager). Unfortunately, I see that some events are missing, and some are delayed, so the gathered data doesn’t inspire confidence. Looks like I have the wrong implementation. I’m looking for your advice to understand the proper way to implement it. This is how it is implemented right now: 1. The user asked to give consent on page 2. The consent tool sends an event to GTM which updates the given consent according to the user’s choice 3. There are 2 tags in GTM created using Mixpanel’s template (added from the official GTM template’s gallery) 4. Tag 1 - Opt-in mixpanel (opt_in_tracking) i. Triggered on consent change and in case analytics consent is given a. Tag 2 - Opt-out mixpanel (opt_out_tracking) i. Triggered on consent change (no additional consent checks added) 5. Inside code
window.mixpanel?.has_opted_in_tracking()
(GTM template adds mixpanel into window object by default) checked and in case it is
true
, then tracking function will trigger
window.mixpanel?.track
function
👀 1