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

Goal not attributed to campaign when triggered manually #2873

Closed
anonymous-matomo-user opened this issue Jan 20, 2012 · 5 comments
Closed

Goal not attributed to campaign when triggered manually #2873

anonymous-matomo-user opened this issue Jan 20, 2012 · 5 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Milestone

Comments

@anonymous-matomo-user
Copy link

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
Copy link
Member

mattab commented Jan 25, 2012

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-matomo-user
Copy link
Author

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
Copy link
Member

mattab commented Feb 9, 2012

(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-matomo-user
Copy link
Author

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
Copy link
Member

mattab commented Feb 9, 2012

Good news, thanks for testing quickly!

@anonymous-matomo-user anonymous-matomo-user added this to the 1.7 Piwik 1.7 milestone Jul 8, 2014
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc.
Projects
None yet
Development

No branches or pull requests

2 participants