wordpresssnapchat

Wordpress Snapchat: Pass Email data


I have added the Snap Pixel Code in the head, which includes: 'snaptr('init', 'ID', { 'user_email': 'INSERT_USER_EMAIL' });'

I now have to pass on the email variable but don't know how to do this.

I am using Contact Form 7 in Wordpress.


Solution

  • From your question I understand that you're looking to integrate the Snap Pixel into Wordpress.

    You can use something like:

    <?php
    $email = "test@test.com"; //your mail address
    ?>
    <script>
    snaptr('init', 'ID', { 'user_email': <?php echo $email; ?> });
    </script>
    

    You can also use a Wordpress Snap Pixel plugin, see for example: https://wordpress.org/plugins/snap-pixel/#installation