Set manually a Goal


(sanremo) #1

Hello,

I’m interesting to set manually a goal (in my example for Site ID = 3 and Goal ID = 1) simple opening a specific URL.

I’m reading this ticket http://dev.piwik.org/trac/ticket/778 without find any comprensible solutions. This is the example code suggested:

piwik.php?idsite=WEBSITE_ID&goal=GOAL_ID&rand=RANDOM_NUMBER&redirect=0&data=JSON_STRING

In my example WEBSITE_ID=3 and GOAL_ID=1 but I not understanding what is RANDOM_NUMBER and JSON_STRING in my specific case.

I try all but no goals was recorded.

Please help me to find the exact url to set a goal manually in my site.

Another question, if setting a goal simple visiting an url is possible: can this “misteryous url” be loaded by cURL or Javascript is needed: I need to set a goal during and header redirections.

I’m recently update my Piwik to version 0.4.1

Sorry for my english and thank’s at all


(vipsoft) #2

That ticket is about implementation internals.

You’ll want to refer to the API: http://piwik.org/docs/javascript-tracking/


(sanremo) #3

Hello vipsoft, first of all thank’s for interesting to my question.

I red this page http://piwik.org/docs/javascript-tracking/ but there is not a solution for my question.

I think that an example of what I try to say is more efficient that spend more words in an english not good.

Here is an example of that I’m speaking www DOT ecuriefape DOT com

Is there a way to track a click an google banner like a Goals?

The target of my form is the same url, the variable $banner indicate to php where it does a redirect.

Thank’s


(vipsoft) #4

See config/global.ini.php. There’s a redirect parameter you can use in outlinks (i.e., outlink_redirect_var_name.