Support » Plugin: WP-Piwik » Request – CDN Support

  • Resolved trappedinside

    (@trappedinside)


    Not sure where to put or send this so hope ok to post here.

    The only thing for me missing from the plugin is being able to change the tracking code to use a CDN. At the moment if I want to use a CDN based tracker I still need to manually edit my template. So annoying considering that it is almost there.

    Ian

    http://wordpress.org/extend/plugins/wp-piwik/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author braekling

    (@braekling)

    Can you give me some information on how you have to change your tracking code?

    Maybe this is just a little change to do. 🙂

    trappedinside

    (@trappedinside)

    Hi Breaking,

    This is the code I manually put into templates.

    <!– Piwik –>
    <script type=”text/javascript”>
    var _paq = _paq || [];
    (function(){ var u=((“https:” == document.location.protocol) ? “https://analytics.domain.com/” : “http://analytics.domain.com/”);
    var ucdn=((“https:” == document.location.protocol) ? “https://cdn.domain.com/” : “http://cdn.domain.com/”);
    _paq.push([‘setSiteId’, SITE_ID]);
    _paq.push([‘setTrackerUrl’, u+’piwik.php’]);
    _paq.push([‘trackPageView’]);
    _paq.push([‘enableLinkTracking’]);
    var d=document, g=d.createElement(‘script’), s=d.getElementsByTagName(‘script’)[0]; g.type=’text/javascript’; g.defer=true; g.async=true; g.src=ucdn+’piwik.js’;
    s.parentNode.insertBefore(g,s); })();
    </script>
    <!– End Piwik Code –>

    This is Asynchronous to also help the site pages load just a little faster. Reference http://piwik.org/docs/javascript-tracking/#toc-asynchronous-tracking

    If we could just copy and paste our own tracking code it would be fine. Otherwise a additional setting page to customise the tracking where we can specify all the different hosts and regenerate code.

    I would be happy to help you test, and give you access to a CDN if you do not have one.

    Ian

    Plugin Author braekling

    (@braekling)

    Hi Ian,

    I’m currently waiting for the Piwik team to finish a feature request, see
    http://wordpress.org/support/topic/plugin-wp-piwik-piwik-asynchronous-tracking

    Using a custom tracking code field (extended by wildcards) sounds good as a workaround. I’ll think about this.

    Best regards
    André

    trappedinside

    (@trappedinside)

    Hi Andre,

    From looking at the history of that asynchronous feature request ( 2 years old now ) i would guess it could take a while before being completed.

    But anything you can do would be really appreciated.

    Ian

    Plugin Author braekling

    (@braekling)

    Feature “custom tracking code” will be part of 0.9.9.

    Plugin Author braekling

    (@braekling)

    CDN support is added in 0.9.9, release today.

    Plugin Author braekling

    (@braekling)

    0.9.9.0 released now. I hope the CDN support works fine 🙂

    This new version works great for me as I have a SSL certificate. However I have realised that many users will not have SSL on the CDN’s as they are very expensive. If possible can you update the next version to allow for different hostnames 1 for http and 1 for https.

    For example if your CDN is with cdn77.com then your http host maybe – cdn.domain.com but your https host would be myprefix.r.worldssl.net

    Sorry I did not specify that in my earlier comments.

    Plugin Author braekling

    (@braekling)

    Alright, updated in 0.9.9.1.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Request – CDN Support’ is closed to new replies.