SHARE
TWEET

Untitled

a guest Mar 26th, 2020 68 in 26 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. // we need to check the URL and member info and (possibly) set 2 cookies.
  4. //
  5. // cookie 1:
  6. // If the URL has utm_source=drip, set the DripSubscriber cookie. You can recognize a Drip subscriber by the utm parameters on the URL like this example:
  7. // https://thehittingvault.com/join? ***utm_source=drip*** &utm_medium=email&utm_campaign=%E2%9A%BE%EF%B8%8F+Breaking+News+%28Sorry+for+the+FOMO%29+%E2%9A%BE%EF%B8%8F
  8. $number_of_days = 90;
  9. if (isset($_GET['utm_source']) && $_GET['utm_source'] === "drip") {
  10.     setcookie('thvDripSubscriber',
  11.         'drip-campaign',
  12.         time() + 60 * 60 * 24 * $number_of_days,
  13.         "/",
  14.         "thehittingvault.com"
  15.     );
  16. }
  17.  
  18. //
  19. // cookie 2:
  20. // When a visitor has an active membership in Member Mouse, set a cookie called thvCurrentMembership with a value of true.
  21. $membershipID = mm_member_data(["name"=>"membershipId"]);
  22. if (is_numeric($membershipID)) {
  23.     setcookie('thvCurrentMembership',
  24.         'true',
  25.         0,
  26.         "/",
  27.         "thehittingvault.com"
  28.     );
  29. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top