-
-
Save Padilo300/0f8c5bc4b2ec1d06a32e4c1e1f643be8 to your computer and use it in GitHub Desktop.
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)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment