The plugin provides a mechanism for saving UTM parameters from URL to cookies for further usage. Saved values are available in PHP code, markup and js. Plugin should be configured, integrated and used individually depending on a particular project. You can configure TTL of cookies.
The following plugins extend or depend on the plugin
UTM Tracker
The plugin allows you to track the advertising channel of a visitor by substituting contact information on the...
UTM Tracker
The plugin allows you to track the advertising channel of a visitor by substituting contact information on the...
UTM Analytics for Shopaholic
Plugin provides UTM-analytics for Shopaholic orders
UTM Analytics for Shopaholic
Plugin provides UTM-analytics for Shopaholic orders
Features
UTM parameters are a tool for traffic source analysis of your website. They are usually used in advertisements and e-commerce. Parameters can be different, but almost all services use a fixed list of parameters:
- utm_source
- utm_campaign
- utm_medium
- utm_term
- utm_content
The problem is that after redirecting to the target website UTM parameters can be easily lost. Usually, it happens when the user decides to click internal links. In this case, the UTM parameters disappear and you can’t send them later with the request form data.
Also, the parameters can be lost if the user leaves the website and returns back after some days via bookmarks or search query.
The plugin allows to solve these problems. It provides a mechanism for saving typical UTM parameters to cookies and fetching them from there for further use.
Usage
UTM parameters can be used for different purposes. You have several ways to get UTM values:
Facade in php code:
\AndreiShilov\UTMSaver\Facades\UTM::get(‘utm_source’);
Markup function in the template:
{{ utm(‘utm_source’) }}
Via javascript, for example using JQuery Cookie plugin:
$.cookie(‘utm_source’);
For example, you have a form for collecting requests. The form has special fields for utm-parameters. You can edit template:
<input type=”hidden” name=”utm_source” value=”{{ utm(‘utm_source’)” /> <input type=”hidden” name=”utm_campaign” value=”{{ utm(‘utm_campaign’)” /> <input type=”hidden” name=”utm_medium” value=”{{ utm(‘utm_medium’)” /> <input type=”hidden” name=”utm_term” value=”{{ utm(‘utm_term’)” /> <input type=”hidden” name=”utm_content” value=”{{ utm(‘utm_content’)” />
Plugin settings allow to set cookies TTL, which is usually used as a part of analysis settings. For example, you can increase value for long-term deals.
Permissions
The plugin has configurable permissions for editing settings.
Notes
Plugin supports russian localization.
If the user visits your website with a new set of UTM parameters, old values will be replaced.
Every hit renews cookie lifetime. But if the user doesn’t visit your website for TTL days, the cookies will be forgotten.
-
This plugin has not been reviewed yet.
-
1.0.2 |
Method \AndreiShilov\UTMSaver\Facades\UTM::all() added Oct 29, 2019 |
---|---|
1.0.1 |
Initialize plugin. Oct 14, 2019 |