Is there a plugin to record querystring parameters for a page (for customer tracking)? [closed]

I am creating an information landing page that I intend to cold email out to a bunch of potential clients. I need to track customers that not only open the email (I know how to do that) but track which email recipients actually navigated to the landing page.

In a custom web application I would do this by sending them a link to the landing page that’s something like www.site.com/landing?rec=my@email.com, and upon seeing the querystring I would put that in the database.

Are there any WordPress plugins to do something like that?

1 Answer
1

WP is not really interested in what you add to the url string. But you could extract the url with native php functions and add your parts to the global wp_query; object using add_query_arg(). Then you can receive it via get_query_var() anywhere you need it.

You could also use a hook to do the adding-job:

function wpse42947_add_query_vars( $vars )
{
    $vars[] = "WHATEVER";
    return $vars ;
}
// hook add_query_vars function into query_vars
add_filter( 'query_vars', 'wpse42947_add_query_vars' );

Leave a Comment