KirbyCMS plugin to geneate dynamic tracking-scripts for Ackee

Overview

Ackee Analytics for KirbyCMS

Plugin for KirbyCMS to generate dynamic tracking-scripts for Ackee.

Plugin requirements

  • PHP 7+
  • KirbyCMS 3

Setup

Clone the repository into your site/plugins folder.

# HTTPS
git clone https://github.com/Sociant/kirby-ackee-analytics.git

# SSH
git clone [email protected]:Sociant/kirby-ackee-analytics.git

Add the plugin to your submodules

# Open from root directory of your project
git submodule add https://github.com/Sociant/kirby-ackee-analytics.git site/plugins/kirby-ackee-analytics

Add the plugin to your template by adding this line to a header-element

ackeeHeader() ?> ...">

    <span class="pl-v">Your</span> <span class="pl-v">Title</span>
    
  "UTF-8">

     echo $page->ackeeHeader() ?>
    ...

Without any changes in the config you won't see a script because the extension is disabled by default.

To enable the extension, add the following line to your config.php (site/config/config.php):

return [
    // your other options
    'sociant.ackee-analytics' => [
        'ackee-analytics-url' => 'https://your-ackee-sever.de',
        'tracker-file-name' => 'tracker.js',
        'enable-tracking' => true,
        'domain-id' => 'Your domain-id',

        // optional if you want to gather information about the language, device and screen resolution of the visitor
        'detailed' => true, 
        // optional if you want to track visitors from localhost
        'ignore-localhost' => false, 
        // optional if you want to track yourself (if you're logged into your ackee-server)
        'ignore-own-visits' => false, 
    ]
];

Customization per template

You can easily change the behaviour of the plugin by extending the ackeeHeader method with options.

You dont have to add every option. If one option is not defined it will fallback to the page option or the global option.

ackeeHeader([ 'isEnabled' => true, 'trackerFileName' => 'tracker.js', 'analyticsUrl' => '', 'domainId' => '', 'detailed' => true, 'ignoreLocalhost' => false, 'ignoreOwnVisits' => false, ]) ?> ...">

    <span class="pl-v">Your</span> <span class="pl-v">Title</span>
    
  "UTF-8">

     echo $page->ackeeHeader([
        'isEnabled' => true,
        'trackerFileName' => 'tracker.js',
        'analyticsUrl' => '',
        'domainId' => '',
        'detailed' => true,
        'ignoreLocalhost' => false,
        'ignoreOwnVisits' => false,
    ]) ?>
    ...

Customization per page

As always you can edit the script by adding options to your page. You can add following identifiers to your blueprint to affect each page:

key function
ackeeTracking to enable or disable tracking
ackeeTrackerFileName the name of the tracker-file (usually 'tracker.js')
ackeeAnalyticsUrl the url of the ackee-server
ackeeDomainId the domain-id of your kirby-website
ackeeDetailed to enable or disable detailed tracking
ackeeIgnoreLocalhost to enable or disable tracking from localhost
ackeeIgnoreOwnVisits to enable or disable tracking yourself (if you're logged into your ackee-server)

Please note that the plugin prioritizes the template options over the page options. If none of them are defined it will always fallback to the global configuration.

License

This plugin is an open-source software licensed under the MIT license.

Copyright © 2021 Sociant

You might also like...
🎨️ A WordPress plugin to disable admin color schemes

Colors A WordPress plugin to disable admin color schemes. Description Disable the admin color schemes for all users. Availiable filters colors_should_

A plugin for Craft CMS 3.X that allows for GraphQL search functionality for matching on fields of nested entries.

Nested Entry GraphQL Plugin This Craft CMS plugin allows for performing graphQL search queries that match on fields on nested entries-as-a-field. What

WinterCMS plugin adding support for streaming html5 videos

Winter MediaStream Intro This plugin adds streaming support for html5 videos. Installation composer install jaxwilko/wn-mediastream-plugin Usage Once

 Element Relations Plugin for Craft CMS 3.x
Element Relations Plugin for Craft CMS 3.x

Element Relations Plugin for Craft CMS 3.x This plugin shows all relations of an element. For example, where an asset, entry or any other element is l

Monet Plugin for Craft CMS

A Monet field can be added to asset elements which will generate and store an efficient placeholder image to be displayed inline, whilst the full asset is loading.

Google Maps Plugin for Typemill CMS.
Google Maps Plugin for Typemill CMS.

Google Maps Plugin This plugin is developed for Typemill, a flat-file cms. How to install Download this plugin (zip). Unzip the plugin. Upload the plu

sGallery Plugin for attaching Images and Video clips (YouTube) to a resource in the Evolution CMS admin panel.
sGallery Plugin for attaching Images and Video clips (YouTube) to a resource in the Evolution CMS admin panel.

sGallery for Evolution CMS 3 sGallery Plugin for attaching Images and Video clips (YouTube) to a resource in the Evolution CMS admin panel. Features U

Composer plugin replacing placeholders in the scripts section by dynamic values

Composer Substitution Plugin The Composer Substitution plugin replaces placeholders in the scripts section by dynamic values. It also permits to cache

PHP project for tracking Azure AD App Reg secrets about to expire, and (manually) tracking SSL certificates

CertExpiry Katy Nicholson https://katystech.blog/ Setup instructions etc available at: https://katystech.blog/2021/11/certexpiry/ PHP project for trac

A collection of command line scripts for Magento 2 code generation, and a PHP module system for organizing command line scripts.

What is Pestle? Pestle is A PHP Framework for creating and organizing command line programs An experiment in implementing python style module imports

The simplest way to create a dynamic sitemap for your self-coded website which you have made by using PHP/HTML/CSS/Js etc... Scripts.

Sitemap_index.xml The simplest way to create a dynamic sitemap for your self-coded website which you have made by using PHP/HTML/CSS/Js etc... Scripts

It's basically a dynamic web browser extension that can display notifications with the help of an admin-controlled dynamic API.
It's basically a dynamic web browser extension that can display notifications with the help of an admin-controlled dynamic API.

D-NOTIFIER A self controlled dynamic API based web browser extension built by Sahil Kumar How It Works? It's basically a dynamic web browser extension

An example starter theme and block-type plugin that use @wordpress/scripts for JS & CSS

Brad’s Boilerplate This repo contains one folder that is an example theme, and another folder that is an example block-type plugin. Both folders use t

WordPress plugin for fluent management of scripts and styles.

Encute WordPress plugin for fluent management of scripts and styles. Managing scripts and styles on the front of your site can be tricky. This makes i

Flexible and rock solid audit log tracking for CakePHP 3

AuditStash Plugin For CakePHP This plugin implements an "audit trail" for any of your Table classes in your application, that is, the ability of recor

Eventum Issue Tracking System

Eventum is a user friendly and very flexible issue tracking system, that can be used by a support department to track incoming technical support requests, or by a software development team to quickly organize tasks and bugs.

undefined is an issue tracking product that allows  agile project management.
undefined is an issue tracking product that allows agile project management.

undefined is an issue tracking product that allows agile project management. Our goal is to make work life simpler, more efficient and stress-free. In

This package connects a Laravel Octance application with Tideways for PHP Monitoring, Profiling and Exception Tracking.

Tideways Middleware for Laravel Octane This package connects a Laravel Octance application with Tideways for PHP Monitoring, Profiling and Exception T

Adds a specific header to every response to disable Google's usage of your site in it's FLoC tracking method.

Go Unfloc Yourself Description A bundle for Symfony 5 that adds a Permissions-Policy header in all the responses to prevent the use of new Google's "F

Releases(v1.0.0)
Owner
SociantWD
SociantWD
Botble plugin comment is a comment plugin for Botble CMS

Botble plugin comment This is a plugin for Botble CMS so you have to purchase Botble CMS first to use this plugin.

Bảo Bối 27 Nov 25, 2021
A Joomla 4 system plugin to make editing content distraction free.

Clean Edit for Joomla 4 A system plugin to make editing content in the front end of your Joomla 4 website distraction free. Why? On a complex site or

Brian Teeman 5 Dec 30, 2022
Zero-Config plugin to disable FLoC in your WordPress Website.

Disable FLoC by WP Munich A simple zero-config plugin to opt-out of Google FLoC. This plugin is made with love and brought to you by the folks of WP M

Luehrsen // Heinrich 9 Jun 1, 2022
Wordpress plugin to allow websites to sell and distribute NFTs through the Enjin platform

MyMeta Basket is the world's first plug-and-play Wordpress/Enjin/Ethereum integration that allows you to start selling blockchain assets through your website within minutes. All you need is Wordpress, MyMeta Basket, and an Enjin subscription.

MyMetaverse 6 Oct 3, 2022
Plugin Vite is the conduit between Craft CMS plugins and Vite, with manifest.json & HMR support

Plugin Vite Related Articles: Vite.js Next Generation Frontend Tooling + Craft CMS A Vite Buildchain for Craft CMS Plugins Requirements Craft CMS 3.0.

nystudio107 8 Dec 30, 2022
Plugin for Craft CMS that makes it easy to interact with the Instagram Basic Display API and Instagram oEmbed.

Instagram Basic Display plugin for Craft CMS 3.x This plugin creates endpoints in your Craft install for you to consume the Instagram Basic Display AP

Jonathan Melville 5 Dec 20, 2022
Sensei LMS WordPress Plugin

Sensei LMS A learning management plugin for WordPress, which provides the smoothest platform for helping you teach anything. Sensei LMS is a commercia

Automattic 449 Jan 4, 2023
(Hard) Fork of WordPress Plugin Boilerplate, actively taking PRs and actively maintained. Following WordPress Coding Standards. With more features than the original.

Better WordPress Plugin Boilerplate This is a Hard Fork of the original WordPress Plugin Boilerplate. The Better WordPress Plugin Boilerplate actively

Beda Schmid 46 Dec 7, 2022
This is a Skyblock Scorehud addon for Skyblock Plugin Made by ᴀɴᴅʀᴇᴀꜱ

SkyblockScore Tags This is a Skyblock Scorehud Tags for Skyblock Plugin Made by andresbytes NOTE This scorehudScoreTags only work for latest Scorehud

null 4 Dec 26, 2021
Provides Twig template IDE autocomplete of Craft CMS & plugin variables

Autocomplete for Craft CMS 3.x Provides Twig template IDE autocompletion for Craft CMS and plugin/module variables and element types. Works with PhpSt

nystudio107 35 Dec 21, 2022