Deep linking
With this tool, you can perform various actions after clicking on the link. The use of deep links is relevant if you want to create your own custom subscription widget or a set of buttons for messengers.
From the Growth Tool menu, select “Deep Linking.”
Click +Create
Write a name
Links are created for all connected channels and have 2 types - web link and app link. Web link - the user prompted to install the selected application if he does not have it. App link - the user receives an error that the link could not be opened if the application is not installed.
Click +action to add an action to be performed after the link is clicked
Integration with your site
Paste this script anywhere on the page:
<script src="https://customer.smartsender.eu/js/client/dl.min.js"></script>
Paste the code below to describe the variables to pass:
<script>
ssDeepLink('{class}', '{domain}', '{query}', '{context}');
</script>
Detailed description of variables inside the script:
Переменная | Описание |
---|---|
class | String. Class name for the group of links to which the script will be active |
domain | String. Your domain name Smart Sender |
query | Boolean. Add query variables to context variables |
context | Object. Variables to pass.
|
Example
<a class="deep-link" href="https://t.me/SmartsenderBot?start=ZGw6NTk2">Link</a>
<script src="https://customer.smartsender.eu/js/client/dl.min.js"></script>
<script>
ssDeepLink('deep-link', 'smartsender', false, {
variables: {
campaign: 'site-1',
email: 'hello@smartsender.com',
},
});
</script>
In this example, we used:
Строка | Описание |
---|---|
1 | Copied the generated link through the "Deep Links" growth tool pasted into the "href" <a> attribute and the "deep-link" class for script use. |
3 | Script for data transfer |
6-9 | Apply to links of the deep-link class for the smartsender domain without including query parameters and with contact variables “email“, “campaign“. |