Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX Notice: Undefined property: page #5

Merged
merged 1 commit into from Nov 4, 2013

Conversation

jorgetutor
Copy link
Contributor

Test:

$tracker = new UnitedPrototype\GoogleAnalytics\Tracker($ua, $host);
$visitor = new UnitedPrototype\GoogleAnalytics\Visitor();
$visitor->setIpAddress($_SERVER['REMOTE_ADDR']);
$visitor->setUserAgent($_SERVER['HTTP_USER_AGENT']);
$session = new UnitedPrototype\GoogleAnalytics\Session();
$event = new UnitedPrototype\GoogleAnalytics\Event();
// Required:
$event->setCategory('category');
$event->setAction('action');

// Optional:
$event->setLabel('label');
$event->setValue(1);

$tracker->trackEvent($event, $session, $visitor);

Error (Notice):

UnitedPrototype\GoogleAnalytics\Internals\Request\EventRequest::$page in UnitedPrototype\GoogleAnalytics\Internals\Request\EventRequest->buildParameters() (line 91 of /{my_site}/sites/all/libraries/php-ga/src/GoogleAnalytics/Internals/Request/EventRequest.php).

thomasbachem added a commit that referenced this pull request Nov 4, 2013
Fixed an "Undefined property" E_NOTICE error when not setting the optional page property of an Event object
@thomasbachem thomasbachem merged commit 3a93d0c into thomasbachem:master Nov 4, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants