Installing Mixpanel Tracking Code

Hi there,

I am trying to install the Mixpanel tracking code. In the linked video they seem to be able to just add it in the theme editor. When I checked in the X theme editor, I didn’t see the same option. I did see a similar option in the parent theme, but after reading the Mixpanel installation guide, it was suggested to install this code in a child theme. What is your opinion on how to best install this tracking code to work with X? Please advise if you can.

Here are some links I used to get to this point:


Thanks,
Ben

Hi Ben,

As the Mixpanel documentation says, you can use this 3rd party plugin https://github.com/pressable/mixpanel-wordpress

Othersie, you can add your scripts like below on your Child Theme’s functions.php

function my_custom_head_output() { ?>

 <script type="text/javascript">
  // Add your custom scripts here
 </script>

<?php }

add_action( 'wp_head', 'my_custom_head_output' );

Hope that helps.

Best regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.