How it works...

In the first step, we have inherited the utm.mixin in the book.issue model. This will add the following fields to the book.issue model:

  • campaign_id: The Many2one field with the utm.campaign model. This is used to track different campaigns, such as the Summer and Christmas Special.
  • source_id: The Many2one field with the utm.source model. This is used to track different sources, like search engines and other domains.
  • medium_id: The Many2one field with the utm.medium model. This is used to track different media, like postcards, emails, or banner ads.

To track the campaign, medium, and source, you need to share a URL in the marketing media like this: your_url?utm_campaign=campaign_name&utm_medium=medium_name&utm_source=source_name

If a visitor visits your website from any marketing media, then the campaign_id, source_id, and medium_id fields are automatically filled when records are created on the website page.

In our example, we have just tracked campaign_id, but you can also add source_id and medium_id.

Note: In our test example, we have used campaign_id=sale. sale is the name of the record in the model utm.campaign. By default, the utm module adds a few records of the campaign, medium, and source. The record sale is one of them. If you want to create a new campaign, medium, and source, you can do this by visiting the Link Tracker > UTMs menu in developer mode.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset