How do I create new visit whenever a user visits my website using a new campaign or a new website referrer?
Matomo (Piwik) tracks users on your websites or apps, and will group actions of a same user into a visit. Here are some rules which are applied to assign actions to visit:
-
By default, Matomo will track in a visit all actions done by a visitor within 30 minutes of the last visitor’s action. See this FAQ to learn how to configure this 30 minutes delay.
-
By default Matomo will create a new visit whenever a visitor views your website using a different campaign information from the visitor’s ongoing visit. You can disable this behavior by setting
create_new_visit_when_campaign_changes=0
under[Tracker]
section in your config/config.ini.php file. You can also configure this setting on a per site basis. -
By default, Matomo won’t create a new visit when a visitor views your website using a different website referrer information. You may configure Matomo to force it to create a new visit whenever a visitor uses a new website referrer. To do so, edit config/config.ini.php file and under
[Tracker]
section add:create_new_visit_when_website_referrer_changes=1
. You can also configure this setting on a per site basis. -
By default, Matomo might also create a new visit when a visit had many actions. Learn more in this FAQ
-
You may also create visits on demand by using the Tracking API or Javascript Tracker. Learn more in this FAQ.