How can I save parts of the URL to the database when a certain page is viewed?
Marketing creates the page with a URL that contains a variable
representing the user. User gets an email and clicks on button that
goes to page. When they get to the page the module is triggered to
collect the variable data from the URL. The module will then save that
value to a DB.

Use template_preprocess_node
Have the URL in the e-mail formatted like this:
example.com/node/1?param1=value1?param2=value2

If it's required that the user must be logged in
example.com/user/login?destination=node/1?param1=value1?param2=value2

I used /node/1 as an example, but you can use its url alias instead if it has one.
Then in your mymodule.module file
function mymodule_preprocess_node(&amp;$variables) {
  $node = $variables['node'];
   if ($node-&gt;type == 'article') { // checks its Article Content Type
     $params = drupal_get_query_parameters();
     if (!empty($params)) {
       // do more magic to get each param value on its own
       // save to the DB
     }
   }
}