2

I'm using the measurement protocol to send an event to Google Analytics. The event shows up fine, but this event also completes a goal for us and the location keeps coming up as (entrance). I've looked around and read some suggestions saying that the cause might be a late (or non-existent) pageview in GA. This makes a bit of sense, since the event is fired from the backend. I'm using cURL to send the request to analytics and the request looks something like the code below. The goal completion location should be the WordPress page the user was previously on, which I've included by sending _wp_original_http_referer with the request.

$data = array(
    'v'   => '1',
    'tid' => 'UA-XXXXXXXX',
    't'   => 'event',
    'ec'  => 'Category',
    'ea'  => 'Action',
    'el'  => 'Label',
    'ev'  => '0',
    'dl'  => $_REQUEST['_wp_original_http_referer']
);

Should I try a property other than dl? I've tried dp as well but had no luck. The documentation doesn't say much about specifying goal locations either.

mcon
  • 679
  • 6
  • 22

0 Answers0