[resolved] [Plugin: WP-Piwik] how to track multisite with woocommerce as single site (2 posts)

  1. frankma
    Posted 3 years ago #


    I've been going through many topics but did not find the answer to my concern. This is my situation:

    I have a WP multisite set up as the main site and a sub-site in a sub folder, like mysite.com and mysite.com/subsite. I would like to use mysite.com as the main landing page or landing site for ad campaigns and mysite.com/subsite as the ecommerce site with WooCommerce. When visitors arrive to mysite.com they get through the landing page(s) and if they like the offer they click on the "start free trial" button. At that point they go to the relevant WooCommerce product page on mysite.com/subsite. So far everything works as it should.

    Piwik is integrated in WooCommerce, but as far as I could figure it out from the code the thank you page of WooCommerce triggers Piwik tracking code only, if Piwik tracking is enbaled in WP-Piwik plugin settings.

    Now, this is exactly the problem. As long as I use manually insert Piwik tracking code with the same site ID into the footer of both sites I get a perfect tracking of visitors across the two web site. However, in this case the WooCommerce thank you page will not trigger the Piwik ecommerce tracking.

    If I go with the automatic insertion of the Piwik tracking code by enabling it in the WP-Piwik settings, then the WooCommerce thank you page should trigger the Piwick ecommerce tracking. But in this case I have a different site ID for the two web sites and when visitors become customers by going from mysite.com over to mysite.com/subsite and check out I lose the campaign-specific conversion tracking due to the different site IDs used in Piwik tracking.

    Is there a way to force WP-Piwik to assign the same site ID in the tracking code to both sites of the multisite and track them as a single web site?

    Thank you in advance for your response!

  2. frankma
    Posted 3 years ago #


    This problem is solved.
    Instead of "network activate", I have activated WP-Piwik individually for each site and then I have changed the site setting to be the main site for the sub-site. Now they both (main site and sub site) have the same site ID in the tracking code.

    Hope this helps to someone else, too.

Topic Closed

This topic has been closed to new replies.

About this Topic