Quantcast
Channel: Piwik Forums - Support & Bugs
Viewing all articles
Browse latest Browse all 13117

Re: Piwik 1.10 Page Overlay

$
0
0
Timo,

When I set 'var u=' to the external URL I gain external tracking, but loose page overley functionality. This still happens when I use _paq.push(["setAPIUrl", apiUrl]) to point to the internal API.

So from my assesment I am unable to get pageoverlay to work properly.

I am a bit confused on the need for setAPIUrl in the first place. Piwik can see the outside world just fine and posts content from feeds and is able to load pages for overley. Why can pageoverlay not use the JS file from the external URL?

The external link to piwik.php and piwik.js are simply symbolic links to the internal server from the outside world so they are the same physical files.

I am a little lost, and could use with a little push in the right direction.

This is my custom script that I am working on to make things work.

<script>
  var _paq = _paq || [];
  _paq.push(["trackPageView"]);
  _paq.push(["enableLinkTracking"]);
  (function() {
    var u=(("https:" == document.location.protocol) ? "https" : "http") + "://" + piwikUrl + "/";
    _paq.push(["setTrackerUrl", u+"piwik.php"]);
    _paq.push(["setSiteId", "#"]);
    _paq.push(["setAPIUrl", apiurl ]);
    var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
    g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
  })();
</script>

Output from console log:


Any thoughts on this?

Thanks.

Cheers

Viewing all articles
Browse latest Browse all 13117

Trending Articles