mautic / mautic-joomla

Joomla Plugin
16 stars 16 forks source link

Update to use JS tracking #24

Closed RCheesley closed 8 years ago

RCheesley commented 8 years ago

Will the plugin be updated to support the new JS tracking? Should we disable it until it is to avoid loading image + JS or can we not use JS until this is updated (plugin is being used to render forms)

escopecz commented 8 years ago

You can still use the tracking pixel unless you implement the JS tracking yourself. In that case the page hits would double. But you're right that we should switch to JS tracking and prepare for Mautic 2.0.

wderuijter commented 8 years ago

Indeed, we are unable to switch our Joomla sites to using JS tracking with it's speed benifits.

wderuijter commented 8 years ago

Any updates on this?

escopecz commented 8 years ago

It seems to be already implemented in the latest code on GitHub (https://github.com/mautic/mautic-joomla/blob/master/mautic.php#L106) Try to download the latest code and install/update the plugin and let us know.

https://github.com/mautic/mautic-joomla/archive/master.zip

wderuijter commented 8 years ago

Hey @escopecz , I've just updated the plugin. Now I see in chrome dev tools 2 requests to mautic's mtc.js (1 script and 1 xhr) and a single request to mautic's mtracking.gif.

I can't see mtracking.gif in the page source. Am I correct to assume the request to the tracking pixel is done through JS?

escopecz commented 8 years ago

That's not good. Can you provide your website URL so I could look at the source?

escopecz commented 8 years ago

I looked to the plugin source again and there is only the JS tracking now. The tracking pixel was removed, so that should make only one tracking request per page load.

wderuijter commented 8 years ago

Hi @escopecz ,

the website in this case for instance https://www.soetkees.nl/bestemmingen/europa/607-belgrado Opening the site incognito only loads the mtc.js once and the mtracking.gif once. I'm running mautic 2.0.1 and installed the joomla plugin in the archive you mentioned earlier.

escopecz commented 8 years ago

Ok, I understand now. The JS will use the good old tracking pixel to track the page visit. So the page have to download both. But with the JS it is downloaded asynchronously, so it's not blocking the page load of your website.

wderuijter commented 8 years ago

Thanks for clearing this up!