Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Questions about the criteria for deciding on a new visit #11677

Closed
feelydh opened this issue May 9, 2017 · 2 comments
Closed

Questions about the criteria for deciding on a new visit #11677

feelydh opened this issue May 9, 2017 · 2 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@feelydh
Copy link

feelydh commented May 9, 2017

hello,

If the value of the pk_campaign parameter is different, we want the new visit to be counted.

The piwik guide says that the basic settings are so.
(Create_new_visit_when_campaign_changes = 1)

But the test results were different.

The default session time is 30 minutes and will only be applied after the end of the session, right?

I eventually changed the piwik.js source code myself

Looking at the code, we do not store the values ​​of the pk_campaign and pk_key parameters in the cookie when there is a session cookie (ses)

Regardless of the session cookie, we changed the cookie back to save if the value of the pk_campaign parameter differs from the value stored in the cookie

example
" if (!cookieSessionValue){ " ==>" if (!cookieSessionValue || {The corresponding conditional statement}){ "

After modifying, it was tested again,
Regardless of the default session time of 30 minutes Create a new visit every time a user visits website with a new campaign.

(Create_new_visit_when_campaign_changes = 1) Is the purpose of this setting the same?
Or is there a way to get the same result without doing it like me?

@sgiehl
Copy link
Member

sgiehl commented May 29, 2017

When setting Create_new_visit_when_campaign_changes to 1, a new visit should be enforced if the same visitor comes back with a different campaign (within the session). No information about the campaign is saved in any cookie. The recognition is done by the visitorId saved in the cookie. Using this ID Piwik checks if the user has a new campaign than before.

Are you using any additional plugins for campaign tracking?

@mattab mattab closed this as completed Jun 21, 2017
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Jun 21, 2017
@peterbo
Copy link
Contributor

peterbo commented Jun 8, 2018

Duplicate of #12218

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

4 participants