electerious / ackee-tracker

Transfer data to Ackee.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The perks of embedding the tracker

gempain opened this issue · comments

In the installation docs, you mention that "We recommend installing ackee-tracker using npm or yarn.".

Though I do see an advantage of doing this, which is to remove the need of having a script tag as the code will be embedded in your pages (also bypasses ACKEE_TRACKER, I am worried that the drawback is you have to make sure your version of the tracker is aligned with that of the server, which is something you don't have to worry about when you reference the script from your server (assuming they are natively in sync).

So, I was wondering whether it's recommended to use an embedded version or generally better to use a script. In any case, it might be a good idea to mention in the readme that if you embed the code, you'll have to manually ensure your tracker is in line with your server.

That said, I don't think mis-alignment will happen often. But when it does, you'll have to re-deploy all your site.

Good point! Loading the script form the Ackee installation should be the recommended way. npm/yarn should get a notice about keeping them up-to-date.

PR welcome!

I've adjusted the text. It will be part of the next release of ackee-tracker.

@electerious so sorry I haven't been active on this, I was busy publishing Metroline and then went on vacation, but thanks a lot for updating this !