Naming-Convention-WIP
Here follows recommendations on how you can name tags, triggers, variables, segments, events and campaigns in Matomo.
The most important thing is that you are consistent when you name things in Matomo.
Remember the whole url will be visible for all users.
Campaigns
Here follows how you can use Matomos URL Builder to tag your campaigns.
You have to do this if you want to know which posts generated traffic to your site.
Page URL required
Here you use the url you want to drive traffic to. As straight forward as that.
Campaign Name Parameter required
Here is where you choose a suiting name for your campaign.
Try to describe what that the campaign is about.
Campaign Source
Here is where you track the source of your campaign. It is as straight forward as to use facebook for facebook or newsletter for newsletter.
Campaign Medium
This is also quite straight forward. Here you tell if your post is organic or paid.
Choose between Paid or Organic.
Campaign Content
This one you can use to differentiate different posts.
For exampple you can use it if you are posting in both your own channels as a private person and in your companies channels
You can also use it if you are using many ads with differns images and copy.
Examples
- niklas
- marcus
- ad-1
- ad-2
Campaign Group
This one you can use to identify a group, audicence or what purpose you have with your post.
Examples
- age-30
- interests-web
- webinar
Campaign Placement
This one you can use to describe where your ad or post is shown. For an ad on Facebook you can add news feed or messenger.
Campaign ID
This one you can use for an unique ID to identify your campaign.
It can contain up to 100 letters, numbers or symbols.
Tags
In Matomo Tag Manager you can set up different tags when you are going to measure your site.
There are different tags for different purposes, for example Matomo Analytics or custom HTML.
Here is some recommendations for how you can name your tags:
- Which system you are using, for example Matomo, Google Analytics or Custom HTML
- Maybe if you are are going to measure a specifc part of your site.
- What kind of tag, for example pageviews or events
- What the tags measures
- Start every word witch a capital, much easier to read
- Separate with a hyphen -
Examples
Say that you want to measure on your site example.com how many have signed up for your newsletter. Here is how you can name your tag:
- Matomo - Home Page - Event - Form Submit
Triggers
You are using triggers to tell Matomo when some kind of measurement should trigger. Here is some recommendations for how you can name your triggers:
- Type of trigger
- What the trigger is measuring
- Start every word with a capital, much easier to read
- Separate with a hyphen
Examples
We continue with the same example for triggers as for tags. Here is how you can name your triggers:
- Element - Form Submit
- Start every word with a capital
- Separate with a hyphen
Variables
Variables allow you to retrieve data that can be used by tags and triggers. Matomo Tag Manager comes with a set of predefined variables that can be used directly and some other variables that can be configured according to your needs.
Here is some recommendations for how you can name your variables:
- Type of variable
- What the variable does
- Start every word with a capital
- Separate with a hyphen
Examples
If you for example want to fetch a element with a css class name example-text. Then the name of the variable would be:
- CJ - CSS Class Example-text
Abbreviations of the different variables
Constant - C Time since page load - TSPL Page Meta Content - PMC Custom Javascript - CJ DOM Element - DE DataLayer - DL First-party cookies - FPC Referrals - R Javascript Variable - JV URL Parameter - UP URL Variable - UV
Segments
Segments enables you to view and analyse reports on smaller groups of your audience. Here is examples of how you can name your segments:
- What the segment does
- Start every word with a capital
Examples
A segment for mobile visitors
- Mobile Visitors
A segment for users who have completed at least one goal on your site
- Users Completed At Least One Goal