If you need to track a link for a specific campaign (QR codes, links in e-mails, etc), you can add UTM parameters to a link.

What are UTM parameters


UTM parameters are five tags you can add to the end of the URLs of your marketing or promotional efforts.

When your appended URL is then visited, it allows analytics software to track information, such as how visitors are coming to your site and if they're interacting with any content associated with a campaign. This can be particularly useful, especially if there are multiple ways to access your online assets and you're trying to identify which channels to focus on.


Parameter
Required
Examples
Description
Campaign ID
utm_id
No
abc.123
Used to identify which ads campaign this referral references.
Campaign Source
utm_source
Yes
google, qr-code, email, newsletter, linkedin, ...
Used to identify the platform, newsletter name, search engine, or other source.
Campaign Medium
utm_medium
Yes
cpc, banner, email, social, event-name, paid-social, ...
Identifies the traffic type, such as email, and event name or cost-per-click.
Campaign Name
utm_campaign
Yes
spring_sale, product-launch, ...
Used for keyword analysis, to identify a specific product promotion or strategic campaign. Use the same name across different channels for the same campaign.
Campaign Term
utm_term
No
running+shoes
Used to manually identify paid keywords you're targeting with your campaign.
Campaign Content
utm_content
No
logolink
Used to differentiate links on the same ad or page. It’s often used for A/B testing the copy or ad placement. If you want to track different ads that point to one URL, use the content parameter.
Note: For most use-cases only the required parameters are more then enough.


How to generate a link with URM parameters


You can manually create it, but it's a lot easier to use an online UTM builder. Any online builder will do, but excellent one is the Campaign URL Builder from Google.