@jjp0226 opened this Issue on April 10th 2017

I have already modified config/config.ini.php (and global.ini.php) file as follows.

I expected to record as a new visit if the visitor comes back to the site less than 30 min ago with the same browser but a different campaign parameters.

But it doesn't seem to work.

Please, help me.

@sgiehl commented on April 10th 2017 Member

Which Piwik version do you use and are you using any additional plugin for campaign tracking?

@JamesJungmoonLim commented on April 10th 2017

@sgiehl I also have the same problem, I tested with Piwik 3.0.3
And I have tried with Piwik Cloud just before, but there was the same problem.

@jjp0226 commented on April 10th 2017

@sgiehl I'm testing on Piwik 3.0.3 with Marketing Campaigns Reporting Plug-in.

@sgiehl commented on April 10th 2017 Member

@jjp0226 setting create_new_visit_when_website_referrer_changes to 1 won't have any effect on campaigns. This effects all referrers without campaign data.

But with the default settings of Piwik (create_new_visit_when_campaign_changes = 1) a new visit should be forced when the campaign data changes. We need to investigate why this might not be the case.

@JamesJungmoonLim @jjp0226 could you post the url parameters you tried? Couldn't reproduce that locally.

@JamesJungmoonLim commented on April 10th 2017
@jjp0226 commented on April 10th 2017

@sgiehl I tried as follows:

Test Page: http://cresendo.net/test.html
URL Parameters: http://cresendo.net/test.html?pk_campaign=campaign1&pk_kwd=keyword1

I have modified config/config.ini.php (and global.ini.php) file by create_new_visit_when_campaign_changes=1

@JamesJungmoonLim commented on April 14th 2017

@sgiehl Is there any update on this?

@sgiehl commented on April 14th 2017 Member

Sorry, hadn't had time yet to have a deeper look at it.
Did any of you change/overwrite the campaign configuration in the config file?
Looking at the code a new visit should be forced with your given urls and default campaign parameters.

@feelydh commented on April 26th 2017

Like jjp0226 and JamesJungmoonLim, I have the same problem

So I tested it,
(Create_new_visit_when_campaign_changes = 1) seems to work after 30 minutes of default session time, 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

" 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?

@mattab commented on May 8th 2017 Member

Hello, it seems to work for us. Can you please create a new ticket and write:

  • List of exact steps to reproduce
  • What you get
  • What you expected instead


@peterbo commented on June 8th 2018 Contributor

Duplicate of #12218

This Issue was closed on May 8th 2017
Powered by GitHub Issue Mirror