How to setup a profile mixpanel tag in google tag manager?
Hi Jonathan M., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đź‘‹
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
To set up a Mixpanel tag in Google Tag Manager, you can follow these steps:1. Download the ./src/template.tpl
file locally from the source code.2. Open a Google Tag Manager Web container via the Google Tag Manager user interface. Preferably one that is already deployed on a website where you can test the template with real use cases.3. In the GTM UI, browse to Templates, and in the box titled Tag Templates, click the blue New button.4. Once the Template Editor is open, click the menu (three vertical dots) in the top-right corner of the window and choose Import.5. Select the template.tpl
file you downloaded locally.6. Follow the prompts. Once import is complete, the Template Editor should show the Mixpanel template in edit mode.7. Click Save to save the template, and then proceed to close the Template Editor.8. In the GTM UI, browse to Tags and click New to create a new tag.9. From the list of available tag templates, choose the Mixpanel template you just imported to the container.After adding the Project Token to its respective field, you need to choose what type of tag to use. Each type corresponds with some command you can use with the Mixpanel JS API. Note that 'init'
, 'push'
and any of the "getter" commands are not supported in the template. The more complex tag types (group
, people
, and track
) are elevated to the top of the drop-down menu with the -
prefix to separate them from the other commands. Once you select a tag type, additional options may appear. Consult the SDK reference for details on how to configure these options.You can then enter Preview mode by clicking the blue Preview button in the Google Tag Manager UI. This opens a new tab with your website running the GTM container, and you can proceed to test the Mixpanel tag as if the container were published. In the Tag Assistant Preview tab, you can see additional information about the trigger events, tags, and variables that fire while you are browsing the page in Preview mode.For more details, you can refer to the Mixpanel documentation.
kapa.ai is still learning and improving, please let me know how I did by reacting below
⤵️ Hint: Mention @kapa.ai in the thread for follow-ups.