BeTheme Analytics Option

edited March 2017 in SEO
I am currently using BeTheme to put in my UA code from Analytics. I wanted to add the UserID tracking property and in order for me to do it in the footer I can add:


<?php if (isset($userName)) : ?>
        ga('set', 'userId', <?php echo(json_encode($userName)); ?>); // Set the user ID using signed-in user_id.
    <?php endif; ?>

However, when I add it into the BeTheme Options > SEO > Analytics it ends up making the PHP Code literal instead of processing the code properly. It's stripping out the ability for the code to run.  Do you suggest moving this to a custom footer in a child theme or is there a better way of doing it?

Comments

Sign In or Register to comment.