Please refer to TemplateMonster Support for any issues surrounding TemplateMonster/TemplateTuning Themes – thanks, Jigoshop Team

Google Analytics Customization

Roman's Avatar

Roman

20 Aug, 2012 10:32 AM

Hello!

I've made some customizations to my Google Analytics tracking code (for multiple domain tracking), which I need to carry over to a new Jigoshop installation. Is there a way to customize the tracking code produced by Jigoshop without touching Jigoshop's core code?

Is there any reference to Jigoshop's API I might have missed?

Thanks in advance!

  1. 2 Posted by Roman on 21 Aug, 2012 08:33 PM

    Roman's Avatar

    ------------ [SOLVED] ------------

    Answering to myself, and for anyone who might need it, here it goes:

    1. You need to create a custom Wordpress plugin.
    2. Remove these two actions
       remove_action( 'wp_footer', 'jigoshop_ga_tracking' )
       remove_action( 'jigoshop_thankyou', 'jigoshop_ga_ecommerce_tracking' )
      
    3. Open the file "/wp-content/plugins/jigoshop/jigoshop_actions.php"
    4. Look for the functions
       function jigoshop_ga_tracking()
       function jigoshop_ga_ecommerce_tracking()
      
    5. Copy-paste them into your new plugin
    6. Rename them to something such as function jigoshop_custom_ga_tracking()
    7. Add the corresponding actions
       add_action( 'wp_footer', 'jigoshop_custom_ga_tracking' )
       add_action( 'jigoshop_thankyou', 'jigoshop_custom_ga_ecommerce_tracking' )
      
    8. And FINALLY tweak them to your liking.

    Have a nice day!!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.