• Resolved HDLF PRODUCTIONS

    (@housedelafunk)


    Hi there.

    I use your plugin to create extra product options when I dont want to use variations, your plugin works great. I also have Google Analytics to generate reports on my sales. I would like to know if it is possible to include the variable generated by your plugin on my reports generated by Google Analytics.

    My store sells shirts, different sizes and colors. For this 2 variables I use variations, but I use your plugin when I want to add an extra option to my shirts, like “Shirt With Logo or Without Logo”.

    If I have 5 colors and 5 sizes, that would create me 25 variations (which is a lot). And if I add the logo option as a variation (which the possible value is With or Without), that means I would have 25 variations * 2 = 50 variations.

    Google Analytics analyzes only information from WooCommerce variations, but not the information stored by your plugin. Is it possible that you can help me out with this???

Viewing 1 replies (of 1 total)
  • Plugin Author ThemeHigh

    (@themehigh)

    In our plugin, there is no default option to add a google analytics event. But you can use jQuery to submit event data on our field value change.

    Add below code snippet in your child theme’s footer.php after <?php wp_footer(); ?> tag.

    <script>
    jQuery(document).ready(function($) {
        
        $("#test_field").change(function(){
            ga('send', 'event', 'Test Field', 'Change', $(this).val());
        });
        
    });
    </script>

    The above code will submit an event when a value is submitted on the extra product field named test_field. You need to replace the text (test_field and Test Field) with the corresponding field name.

    Hope this helps.

    Thank you!

Viewing 1 replies (of 1 total)
  • The topic ‘REPORTS’ is closed to new replies.