/yab_utm_tracker

Saves UTM tracking parameter in a session for later usage.

Primary LanguageMakefileGNU General Public License v2.0GPL-2.0

yab_utm_tracker

Download

This is a Textpattern CMS plugin.

Saves UTM tracking parameter in a session for later usage.

Usage

Install and activate the plugin.

Place at least one <txp:yab_utm_tracker /> on the page where you expect the UTM parameters are set (normally the landing page of a campaign etc). You can also just place it in the template on for every page. If UTM parameters are read and stored they will not be overwritten for this current session.

Attributes

tracker:

To show the parameters for this session you can make use of the tracker attribute. Available trackers are utm_source, utm_medium, utm_campaign, utm_term and utm_content.

<txp:yab_utm_tracker tracker="utm_campaign" />

clear:

Clears the current storage of the parameters in the current session.

<txp:yab_utm_tracker clear="1" />

Example

<txp:yab_utm_tracker />

<ul>
    <li>Source: <txp:yab_utm_tracker tracker="utm_source" /></li>
    <li>Medium: <txp:yab_utm_tracker tracker="utm_medium" /></li>
    <li>Campaign: <txp:yab_utm_tracker tracker="utm_campaign" /></li>
    <li>Term: <txp:yab_utm_tracker tracker="utm_term" /></li>
    <li>Content: <txp:yab_utm_tracker tracker="utm_content" /></li>
</ul>

Changelog

Version 0.1.1 – 2024-11-14

  • fix: fixed a bug where parameters where not stored in session.

Version 0.1.0 – 2024-11-14

  • Initial release.