- unzip master.zip as folder
site/plugins/kirby3-utm
or git submodule add https://github.com/bnomei/kirby3-utm.git site/plugins/kirby3-utm
orcomposer require bnomei/kirby3-utm
Create a new page at root level with the blueprint utm
.
Events will automatically be tracked to a sqlite database and appear in the UTM page within the panel grouped by campaign and displaying multiple stats.
Original UTM explanation from Bonnie Kittle at cdgi.com.
The advertiser, site, publication, etc. that is sending traffic to your property
The advertising or marketing medium, for example, CPC (cost-per-click), banner ad, email newsletter
The individual campaign name, slogan, promo code, etc.
Identify paid search keywords. If you’re manually tagging paid keyword campaigns, you should also use utm_term to specify the keyword.
Used to differentiate similar content or links within the same ad. For example, if you have two call-to-action links within the same email message, you can use utm_content and set different values for each so you can tell which version is more effective. (i.e. image, button, headline)
Warning
If global debug mode is true,
the plugin will flush its cache and not write any more caches.
For best performance, set either the global or plugin-specific cache driver to one using the server's memory, not the default using files on the hard disk (even on SSDs). If available, I suggest Redis/APCu or leave it at file
otherwise.
site/config/config.php
return [
'cache' => [
'driver' => 'apcu', // or redis
],
'bnomei.utm.cache.ipstack' => [
'type' => 'apcu', // or redis
],
'bnomei.utm.cache.ratelimit' => [
'type' => 'apcu', // or redis
],
'bnomei.utm.cache.queries' => [
'type' => 'apcu', // or redis
],
];
bnomei.utm. | Default | Description |
---|---|---|
enabled | true |
|
cache.ipstack | true |
seperate cache for ip data, expires at ipstack.expire |
cache.ratelimit | true |
seperate cache for ratelimit, expires at ratelimit.expire |
cache.queries | true |
seperate cache for most queries used in panel, flushes automatically with each event tracked |
ipstack.access_key | null |
string. access key |
ipstack.https | false |
boolean. if true will use premium https endpoint. |
ipstack.expire | 60*24 |
int. cache in minutes for ipstack IP resolution. |
sqlite.file | fn() |
path to sqlite file. like site/logs |
stats.range | 30 |
int. half of range of days for bar and change percentage |
ratelimit.enabled | true |
bool. if true it will limit on params below |
ratelimit.expire | 60 |
int. in minutes before trials reset |
ratelimit.trials | 120 |
int. number of allowed trials in given duration |
botDetection.CrawlerDetect | true |
check for crawlers (~10ms) |
botDetection.DeviceDetector | true |
check for bots (~40ms) |
- (optional) free ipstack account for IP geolocations
This plugin is provided "as is" with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment. If you find any issues, please create a new issue.
It is discouraged to use this plugin in any project that promotes racism, sexism, homophobia, animal abuse, violence or any other form of hate speech.