Created
July 23, 2020 16:09
-
-
Save Padilo300/aa872fa670f24d265b73b99bdf4e6bf4 to your computer and use it in GitHub Desktop.
save utm
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function save_utm(){ | |
if( isset( $_GET['utm_source'] ) ) { | |
setcookie('utm_source',$_GET['utm_source'], time()+ (90*86400)); | |
} | |
if( isset( $_GET['utm_medium'] ) ) { | |
setcookie('utm_medium',$_GET['utm_medium'], time()+ (90*86400)); | |
} | |
if( isset( $_GET['utm_campaign'] ) ) { | |
setcookie('utm_campaign',$_GET['utm_campaign'], time()+ (90*86400)); | |
} | |
} | |
save_utm(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment