Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function TrackUtm(){
- var utm_sorce = window.location.href.match(/utm_source=([^&]+)/);
- var utm_medium = window.location.href.match(/utm_medium=([^&]+)/);
- var utm_campaign = window.location.href.match(/utm_campaign=([^&]+)/);
- var utm_term = window.location.href.match(/utm_term=([^&]+)/);
- var utm_content = window.location.href.match(/utm_content=([^&]+)/);
- var utm_email = window.location.href.match(/utm_email=([^&]+)/);
- if (utm_content != undefined) {
- carrotquest.identify({ 'Последняя метка UTM Content': utm_content[1] });
- };
- if (utm_sorce != undefined) {
- carrotquest.identify({ 'Последняя метка UTM Source': utm_sorce[1] });
- };
- if (utm_medium != undefined) {
- carrotquest.identify({ 'Последняя метка UTM Medium': utm_medium[1] });
- };
- if (utm_campaign != undefined) {
- carrotquest.identify({ 'Последняя метка UTM Campaign': utm_campaign[1] });
- };
- if (utm_term != undefined) {
- carrotquest.identify({ 'Последняя метка UTM Term': utm_term[1] });
- };
- if (utm_email != undefined) {
- carrotquest.identify({ '$email': utm_email[1] });
- };
- };
- TrackUtm();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement