Setup new website for newsletter tracking only

Hi
On the doc about measuring newsletter performance I read: To not bias your regular page views on your website with newsletter openings, we recommend tracking newsletter openings into a new website.

So I did setup a new website dedicated to newsletter stats. But where should I put that new site’s Tracking code? Do I have to add it next to the already existing tracking code that generates my regular page views stats ?

Hi,

You wouldn’t use the new tracking code anywhere. All data for this website comes from the newletter tracking

1 Like

Thanks for the quick reply.

So simply putting the pixel tracking in the newsletter is all takes? wow great

1 Like

One more question: when I use URLs generated here, I guess I have to add the site’s ID to the link?
Like piwik.php?idsite=X ?

No, you don’t need to.

When the site you are tracking is called http://example.com/, you simply replace the link to it with http://example.com/?pk_campaign=name_of_the_campaign

Hm, something is still blocking in my head from understanding this …

So if my site is example.com and my matomo installation is on stats.example.com (on an other server):

In matomo I have 2 sites set up: example.com-stats (ID=1) and newsletter-stats (ID=2)

How does the link http://example.com/?pk_campaign=name_of_the_campaign get info into newsletter-stats when there is only a tracking code for example.com-stats on my site ?

Is the connection happening via the beacon image that contains the ID ?

Hi,

It doesn’t. You are mixing up Campaing tracking with tracking pixel in emails.

When someone visits http://example.com/?pk_campaign=name_of_the_campaign the visit is tracked normally in the site-id 1 with the added bonus of saving that the visitor came from name_of_the_campaign.

If you want to know how many people have opened your email (or rather loaded all images in the email) you can add an image like this to the email

<img src="https://piwik.example.com/piwik.php?idsite=YOUR_PIWIK_WEBSITE_ID&rec=1&bots=1&url=https%3A%2F%2Fexample.com%2Femail-opened%2Fnewsletter_XYZ&action_name=Email%20opened&_rcn=internal%20email%20name&_rck=newsletter_XYZ" style="border:0;” alt="" />

with idsite=2. Then every time someone loads this image (by opening the email) you see an visit in Matomo and site-id 2

Thanks for the clarification!

My aim of setting up a website dedicated to the newsletter was to collect all the concerned information there. So newsletter opening and link clicking.
Is that doable? Or (not) recommendet?

I’d recommend you to track all e-mail-opening (via the tracking pixel) in a seperate website so you can differentiate it from normal page visits and keeping the campaign tracking with the regular page views.

1 Like

OK will do that. thanks!