@anonymous-piwik-user opened this Issue on January 20th 2012

Hallo,

There seems to be a bug in the goal tracking when the visitor arrives trough a campaign. The goal gets attributed to the referring domain and not the campaign. This seesm to happen when you trigger the goal manually. If I track an external link for example the goal is attributed to the campaign. In Visitor Log the visit has the right campaign and the goal is tracked, but it is not attributed to the campaign, but for the referring domain.

A bit more information can also be found in this thread at the forum: http://forum.piwik.org/read.php?2,84849
Keywords: campaign goal

@mattab commented on January 25th 2012 Member

The code should credit the campaign instead of the referring domain, can you reproduce the issue that campaign is not credited, reproduced each time? or just some times?

@anonymous-piwik-user commented on January 25th 2012

I don't have a clean test setup for this, so I can only see on some live statistics.
In the last week I have 0 goals credited for campaigns. 75 for search engines, 3 websites and 3 direct entry. If I compare it with the Visitor Log most of the goals are from campaigns. The campaigns are mostly Google AdWords as far as I know.
And this problem only occurs with goals that are tracked manually with <a onclick="piwikTracker.trackGoal(1)" ...>. Goals that are triggered when someone clicks on external link for example are correctly credited to the campaigns.

@mattab commented on February 9th 2012 Member

(In [5788]) Fixes #2873

  • Unfortunately I wasn't able to replicate the issue 'naturally' so I replicated what I think happens in the tests.
  • When the campaign is not set in the "track goal request" but the visit triggering the goal has a campaign set, then we credit this campaign (read it from the visit)
  • Added integration tests
    Please can you patch GoalManager.php and report if this fix is working for you? If not, then I would like please to have access to your piwik server mysql db and codebase to investigate further, thanks!!
@anonymous-piwik-user commented on February 9th 2012

I have patched GoalManager.php in piwik 1.6 this morning. Until now this goal was tracked only twice today, but it seems to work. There was one direct entry and one campaign and they appear correctly in the goal view now. Thank you very much!

@mattab commented on February 9th 2012 Member

Good news, thanks for testing quickly!

This Issue was closed on February 9th 2012
Powered by GitHub Issue Mirror