Augment or replace entirely the default tracked params
Universal Track Manager: A Gem for Tracking Page Visits.
Version 0.7.2 — 2021-02-27
Normally the default UTMs are all you want to track are: utm_campaign
, utm_medium
, utm_source
, utm_term
, utm_content
, but you can now use Universal Track Manager to track other kinds of tracking parameters that come into your Rails website as GET parameters. (For example, 3rd party ad networks.)
For example, all clicks from Facebook have a fbclid
, and clicks from Google Adwords have a glicd
As from the installation section of the docs…
To track only the default utms (utm_campaign, utm_medium, utm_source, utm_term, utm_content), use the generator like so:
rails generate universal_track_manager:install
If you also want to track Facebook and Google clicks IDs, append the parameter --add
with a list of field names separated by COMMA.
rails generate universal_track_manager:install --add=fbclid,gcllid
To REPLACE the default list of tracked parameters, use --only
rails generate universal_track_manager:install --only=abc,def
The default utm_campaign would not be tracked in the above case
Of course, you can also use --only
to specify a subset of the UTM fields like so:
rails generate universal_track_manager:install --only=utm_source,utm_campaign,utm_medium
Again thanks to @sstrumph for his work on this nice upgrade!