Go Back

Tracking additional metadata with Custom Dimensions

July 4, 2018

If you want to be able to track additional metadata, so you can have a more detailed overview of your user-base and enrich the spectrum of tracked information to have a broader overview of your app/website UX – that’s the article for you. As long as your website metadata can be defined by the part of URL, URL query parameter and anything else that can end up as the Tag Manager Variable so it can be tracked it’s totally achievable.

Additional metadata:

Language

(DE, NL, PL) – selected from the selector on top of the website.

1. Create a Variable: Name: “Meta | Language”; Type: Document; Document name: “querySelector(“meta[name=’language’]”).content”.

2. After that, access Piwik PRO Tag, and add Custom Dimension: Id: 1, {{Meta | Language}}; Trigger: All page views.

Is the User logged-in?

1. Variable created: Name: “Meta | Logged In”; Type: Document; Document name: “querySelector(“meta[name=’logged_in’]”).content”.

2. After that, access Piwik PRO tag, and add custom dimension: Id: 1, {{Meta | Logged In}}; Trigger: All page views.