Social media traffic is currently identified only through the referrer domain. As a fallback, app traffic is currently classified as direct traffic.
It would be interesting to also attribute traffic to social media based on click IDs and user agent.
Summary
Here is the workflow I had in mind (assuming there is no UTM or equivalent within the landing page URL).
It is basically about adding a few fallbacks for social media attribution :
- if referrer matches a social network AND contains search query parameters → classify as search engine traffic (unchanged)
- else if referrer matches social THEN social media (unchanged)
- else if no referrer but social click ID* (such as fbclid) is present within the landing page URL THEN social media (previously counted as direct traffic, although they are detected as we can see in visit log)
- else if no referrer but in-app social media identifiers** are present within user agent, THEN social media
Lets take Facebook as an example :
- The presence of fbclid query parameter indicates that the visit comes from Facebook, even without referrer ;
- The presence of [FBAN/FB4A;FBAV/version-number] indicates that the visit has been made from the in-app browser of Facebook for Android.
It would be relevant to change the current conversion table from the current format :
[...]
Facebook:
- facebook.com
- fb.me
- m.facebook.com
- l.facebook.com
[...]
To an object such as (for example) :
[...]
Facebook:
referrerDomains:
- facebook.com
- fb.me
- m.facebook.com
- l.facebook.com
clickIds:
- fbclid
userAgentPatterns:
- FBAN/FB4A
- FBAN/FBIOS
[...]
And of course adjust how the table is handled in consequence.
Relevant files :
Your Environment
- Matomo Version: Mostly Cloud
- PHP Version:
- Server Operating System:
- Additionally installed plugins:
Social media traffic is currently identified only through the referrer domain. As a fallback, app traffic is currently classified as direct traffic.
It would be interesting to also attribute traffic to social media based on click IDs and user agent.
Summary
Here is the workflow I had in mind (assuming there is no UTM or equivalent within the landing page URL).
It is basically about adding a few fallbacks for social media attribution :
Lets take Facebook as an example :
It would be relevant to change the current conversion table from the current format :
To an object such as (for example) :
And of course adjust how the table is handled in consequence.
Relevant files :
Your Environment