Custom Java Script


#1

Hi!

Im new on Piwik, and have one question for you guys.

I have a customer who dos not want to add full tracking code to website, he dos not want me to see full analytics on web site. He only allows tracking of specific web page.

Is this kind of tracking code available?
Or is it easy to tune from full tracking code?

Thanks, Miika


(mahdi1234) #2

If understood correctly, it shall track only single or few pages not the entire web, right?

Then just include js on those pages you would like to track and don’t on the others.


#3

[quote=mahdi1234]
If understood correctly, it shall track only single or few pages not the entire web, right?

Then just include js on those pages you would like to track and don’t on the others.[/quote]

So if I only add js on register page, so it dos not track any other pages?
Is it that simple? :slight_smile:


(mahdi1234) #4

Yep, that’s it.


#5

[quote=mahdi1234]
Yep, that’s it.[/quote]

Nice thanks! :slight_smile:

One idea that i had in my mind also, do you know if it is possible to track one user from email campaign, and if he realy goes and registers?
Site is also used on normal users, so those who register from another way, not from email campaign, can not be tracked.


(mahdi1234) #6

Sure, read here - http://piwik.org/docs/tracking-campaigns/ for full description on how to achieve this …

in short just include pk_campaign=email or whatever you call the campaing in the url from email campaign and the visit will be attributed to the email, not as direct entry.


#7

[quote=mahdi1234]
Sure, read here - http://piwik.org/docs/tracking-campaigns/ for full description on how to achieve this …

in short just include pk_campaign=email or whatever you call the campaing in the url from email campaign and the visit will be attributed to the email, not as direct entry.[/quote]

yes that i understand and it works superb :slight_smile: but if user goes to register page, and actually registers, then goes to thankyou page. How can i track this by specific user, not all users that go to thankyou page?

Because if i send mail campaign to 100K users, and i get money only from those recipients who register and go to thankyou page, not any other users who registers :smiley:


(mahdi1234) #8

You can set a goal - http://piwik.org/docs/tracking-goals-web-analytics/ - e.g. visiting thankyou page and then filter for visitors entered via campaign.


#9

[quote=mahdi1234]
You can set a goal - http://piwik.org/docs/tracking-goals-web-analytics/ - e.g. visiting thankyou page and then filter for visitors entered via campaign.[/quote]

Okei, found that customer uses wordpress site, so so, it is tricky stuff. Because landing page is frontpage for mail campaign, and if i add tracking to footer.php it tracks all pages.
So i need to find howto add js to specific page inside wp.

One thing, if i dont add js to index page, and add to thankyou page, dos it still track users from campaign?
or is the tracking lost when user browses other pages on web site, and comes last to register -> thankyou page?


(mahdi1234) #10

I’m afraid it’s lost, but you can check in your data, maybe you can somehow dig it directly from piwik.

Though what shall be pretty easy is to pass campaign parametr in url to thankyou page (coded in wp; only for users who came from email url) and then it would be attibuted to that campaign for sure.

PS: based on your workflow if landing page is directly preceding thank you page, it shall work as referrer, thus you could track it, if there’s more pages in the workflow inbetween then no.


#11

[quote=mahdi1234]
I’m afraid it’s lost, but you can check in your data, maybe you can somehow dig it directly from piwik.

Though what shall be pretty easy is to pass campaign parametr in url to thankyou page (coded in wp; only for users who came from email url) and then it would be attibuted to that campaign for sure.

PS: based on your workflow if landing page is directly preceding thank you page, it shall work as referrer, thus you could track it, if there’s more pages in the workflow inbetween then no.[/quote]

okei, did not quite understand what you mean, or how i can fix this, but i do some research more.
Im thinking that i build some cookie handling, and so i can add some parameters to email track code, but…

well thank you, your help was needed :slight_smile: