Skip to content

Commit

Permalink
add missing utmwv
Browse files Browse the repository at this point in the history
  • Loading branch information
jozef committed Sep 6, 2011
1 parent 1f30494 commit 4998e2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/WWW/Tracking/Data/Plugin/GoogleAnalytics.pm
Expand Up @@ -5,6 +5,7 @@ use URI::Escape 'uri_escape';
use LWP::UserAgent;

our $UTM_GIF_LOCATION = 'http://www.google-analytics.com/__utm.gif';
our $GA_VERSION = '4.4sp';
our @URL_PAIRS = (
'utmhn' => 'hostname', # Host Name, which is a URL-encoded string.
'utmp' => 'request_uri', # Page request of the current page.
Expand Down Expand Up @@ -33,7 +34,8 @@ sub _utm_url {
return
$UTM_GIF_LOCATION
.'?'
.'utmac='.$tracker_account # Account String. Appears on all requests.
.'utmwv='.$GA_VERSION
.'&utmac='.$tracker_account # Account String. Appears on all requests.
.'&utmn='.$class->_uniq_gif_id # Unique ID generated for each GIF request to prevent caching of the GIF image.
.'&utmcc=__utma%3D999.999.999.999.999.1%3B' # Cookie values. This request parameter sends all the cookies requested from the page.
.join(
Expand Down
4 changes: 2 additions & 2 deletions t/04_WWW-Tracking-Data-Plugin-GoogleAnalytics.t
Expand Up @@ -28,7 +28,7 @@ AS_GA_BASIC_PARAMS: {
'tracker_account' => 'MO-9226801-5',
'tracker_type' => 'ga'
)->from('hash' => \%initial_data);
is($wt->data->as_ga, 'http://www.google-analytics.com/__utm.gif?utmac=MO-9226801-5&utmn=115935801&utmcc=__utma%3D999.999.999.999.999.1%3B&utmhn=test.kutej.net&utmp=%2Fpath%2Fto%2Fthere&utmr=http%3A%2F%2Fjozef.kutej.net%2F%3Fq%3Dreferer&utmvid=202cb942ac50075c964b07152d234b70&utmip=109.72.0.72', 'as_ga()');
is($wt->data->as_ga, 'http://www.google-analytics.com/__utm.gif?utmwv=4.4sp&utmac=MO-9226801-5&utmn=115935801&utmcc=__utma%3D999.999.999.999.999.1%3B&utmhn=test.kutej.net&utmp=%2Fpath%2Fto%2Fthere&utmr=http%3A%2F%2Fjozef.kutej.net%2F%3Fq%3Dreferer&utmvid=202cb942ac50075c964b07152d234b70&utmip=109.72.0.72', 'as_ga()');

eval { $wt->make_tracking_request };
SKIP: {
Expand Down Expand Up @@ -60,7 +60,7 @@ AS_GA_MAKE_TRACKING_REQUEST: {
'tracker_account' => 'MO-9226801-5',
'tracker_type' => 'ga'
)->from('hash' => \%initial_data);
is($wt->data->as_ga, 'http://www.google-analytics.com/__utm.gif?utmac=MO-9226801-5&utmn=115935801&utmcc=__utma%3D999.999.999.999.999.1%3B&utmhn=test.kutej.net&utmp=%2Fpath%2Fto%2Fthere&utmr=http%3A%2F%2Fjozef.kutej.net%2F%3Fq%3Dreferer&utmvid=202cb962ac59075b964b07152d234b70&utmip=109.72.0.72&utmcs=UTF-8&utmul=de-AT&utmje=0&utmsc=24&utmsr=1024x768&utmfl=9.0', 'as_ga()');
is($wt->data->as_ga, 'http://www.google-analytics.com/__utm.gif?utmwv=4.4sp&utmac=MO-9226801-5&utmn=115935801&utmcc=__utma%3D999.999.999.999.999.1%3B&utmhn=test.kutej.net&utmp=%2Fpath%2Fto%2Fthere&utmr=http%3A%2F%2Fjozef.kutej.net%2F%3Fq%3Dreferer&utmvid=202cb962ac59075b964b07152d234b70&utmip=109.72.0.72&utmcs=UTF-8&utmul=de-AT&utmje=0&utmsc=24&utmsr=1024x768&utmfl=9.0', 'as_ga()');

eval { $wt->make_tracking_request };
SKIP: {
Expand Down

0 comments on commit 4998e2d

Please sign in to comment.