|
| 1 | +--- |
| 2 | +page_id: 802630b5-2d42-4341-b6c1-052b0d06b794 |
| 3 | +title: Add marketing tags using properties |
| 4 | +sidebar: |
| 5 | + order: 5 |
| 6 | +relatedArticles: |
| 7 | + - 9fa41f57-5ee7-4c8b-a401-f5384e8db1bb |
| 8 | + - f297a051-485f-4d7e-ae70-58063e96b60a |
| 9 | +app_context: |
| 10 | + - m: user |
| 11 | + s: properties |
| 12 | +--- |
| 13 | + |
| 14 | +Marketing analytics relies on data about customer behaviour. This can include how a customer finds you, e.g. through a campaign, and what a customer does when they interact. Kinde allows you to pass marketing tag data in tokens, and store it as [properties](/properties/about-properties/) in Kinde. From here, you can extrapolate campaign success and other metrics you wish to track. |
| 15 | + |
| 16 | +## What tracking tags are supported? |
| 17 | + |
| 18 | +Out of the box Kinde gives you 3 categories containing marketing properties which are available at both an organization and user level: |
| 19 | + |
| 20 | +### UTM tags category |
| 21 | + |
| 22 | +Contains the following properties: |
| 23 | + |
| 24 | +* UTM source `utm_source` |
| 25 | +* UTM medium `utm_medium` |
| 26 | +* UTM campaign `utm_campaign` |
| 27 | +* UTM content `utm_content` |
| 28 | +* UTM term `utm_term` |
| 29 | + |
| 30 | +### Google Ads smart campaign tracking |
| 31 | + |
| 32 | +Contains the following properties: |
| 33 | + |
| 34 | +* Google ID `gclid` |
| 35 | +* Google click ID `click_id` |
| 36 | +* HSA account `hsa_acc` |
| 37 | +* HSA campaign `hsa_cam` |
| 38 | +* HSA group `hsa_grp` |
| 39 | +* HSA ad `hsa_ad` |
| 40 | +* HSA source `hsa_src` |
| 41 | +* HSA target `hsa_tgt` |
| 42 | +* HSA keyword `hsa_kw` |
| 43 | +* HSA match type `hsa_mt` |
| 44 | +* HSA network `hsa_net` |
| 45 | +* HSA version `hsa_ver` |
| 46 | + |
| 47 | +### Marketing category |
| 48 | + |
| 49 | +Contains the following properties: |
| 50 | + |
| 51 | +* Match type `match_type` |
| 52 | +* Keyword `keyword` |
| 53 | +* Device `device` |
| 54 | +* Ad group `ad_group_id` |
| 55 | +* Campaign ID `campaign_id` |
| 56 | +* Creative `creative` |
| 57 | +* Network `network` |
| 58 | +* Ad position `ad_position` |
| 59 | +* Facebook ID `fbclid` |
| 60 | +* LinkedIn ID `li_fat_id` |
| 61 | +* Microsoft ID `msclkid` |
| 62 | +* X ID `twclid` |
| 63 | +* TikTok ID `ttclid` |
| 64 | + |
| 65 | +## Getting marketing tags into Kinde |
| 66 | + |
| 67 | +There are a few mechanisms for updating these property values in Kinde. |
| 68 | + |
| 69 | +### Pass the tracking tags via the auth flow |
| 70 | + |
| 71 | +This is the most common method. For example, if you want to pass in the UTM source, you just need to forward the `utm_source` query parameter as part of the sign up flow authentication url. Most of our SDKs allow you to pass this in via additional URL params. |
| 72 | + |
| 73 | +For example in the React SDK: |
| 74 | + |
| 75 | +```jsx |
| 76 | +<RegisterLink |
| 77 | + className="btn btn-dark" |
| 78 | + authUrlParams={{ |
| 79 | + utm_source: "my source", |
| 80 | + utm_medium: "some medium", |
| 81 | + utm_campaign: "awesome campaing", |
| 82 | + utm_content: "something else", |
| 83 | + utm_term: "my terms", |
| 84 | + click_id: "1234", |
| 85 | +}} |
| 86 | +>Register</RegisterLink> |
| 87 | +``` |
| 88 | + |
| 89 | +We automatically map the standard query parameters to the specific Kinde properties for you. For example `utm_source` URL param will be mapped to the `kp_usr_utm_source` Kinde parameter for a user and `kp_org_utm_source` for an organization. We map these automatically so that you do not need to make changes to the parameters in your code. |
| 90 | + |
| 91 | +The property values are set during the sign up flow for new users and at the point of organization creation for new organizations. |
| 92 | + |
| 93 | +### Update the tracking tags manually |
| 94 | + |
| 95 | +* Via dashboard - Open a user or organization in Kinde, then select *Properties* from the side navigation. Update the relevant property. |
| 96 | +* Via the Kinde Management API - |
| 97 | + * [Update user property](https://docs.kinde.com/kinde-apis/management/#tag/users/put/api/v1/users/{user_id}/properties/{property_key}) - make sure to add `kp_usr_` as a prefix to the standard tag key. |
| 98 | + * [Update organization property](https://docs.kinde.com/kinde-apis/management/#tag/organizations/put/api/v1/organizations/{org_code}/properties/{property_key}) - make sure to add `kp_org_` as a prefix to the standard tag key. |
| 99 | + |
| 100 | +## Accessing marketing tags data |
| 101 | + |
| 102 | +* Via dashboard - Open a user or organization in Kinde, then select *Properties* from the side navigation. |
| 103 | +* Via the Kinde Management API - |
| 104 | + * [View user properties](https://docs.kinde.com/kinde-apis/management/#tag/users/get/api/v1/users/{user_id}/properties) |
| 105 | + * [View organization properties](https://docs.kinde.com/kinde-apis/management/#tag/organizations/get/api/v1/organizations/{org_code}/properties) |
| 106 | + |
| 107 | +## Check how specific marketing tags are performing |
| 108 | + |
| 109 | +Likely you will want to see which tags are converting into sign ups and are performing well. For this, you can use the User search API to return all users that match a specific property value. For example, if you wanted to see all users who signed up with a UTM source of "Hello" and a UTM campaign of "World" you could use this query: |
| 110 | + |
| 111 | +``` |
| 112 | +/api/v1/search/users?query=properties[kp_usr_utm_source]=Hello&properties[kp_usr_campaign]=World |
| 113 | +``` |
| 114 | + |
| 115 | +The search organizations API is coming soon. |
0 commit comments