function ga_push_add_pageview in GA Push 8
Same name and namespace in other branches
- 7 ga_push.module \ga_push_add_pageview()
Push a GA pageview.
Page tracking allows you to measure the number of views you had of a particular page on your web site. For a web app, you might decide to track a page when a large portion of the screen changes, for example when the user goes from the home screen to the settings screen.
Example:
ga_push_add_pageview(array(
'location' => 'https://google.com/analytics',
'page' => '/my-overridden-page?id=1',
'title' => 'My overridden page',
));
Parameters
array $push: An associative array containing:
- location: string (optional) URL of the page being tracked. By default, analytics_js sets this to the full document URL, excluding the fragment identifier.
- page: string (optional) A string that is uniquely paired with each category, and commonly used to define the type of user interaction for the web object.
- title: string (optional) The title of the page.
string $method_key: Method key.
array $options: Extra options.
See also
https://developers.google.com/analytics/devguides/collection/analyticsjs...
https://developers.google.com/analytics/devguides/collection/gajs/
1 call to ga_push_add_pageview()
- PageView::doExecute in src/
Plugin/ RulesAction/ PageView.php - Executes the action with the given context.
File
- ./
ga_push.module, line 487 - Drupal Module: GA Push.
Code
function ga_push_add_pageview(array $push = [], $method_key = NULL, array $options = []) {
ga_push_add($push, GA_PUSH_TYPE_PAGEVIEW, $method_key, $options);
}