You are here

function ga_push_add_social in GA Push 7

Same name and namespace in other branches
  1. 8 ga_push.module \ga_push_add_social()

Push a GA social.

Social Interaction Analytics allows you to measure the number of times users click on social buttons embedded in webpages. For example, you might measure a Facebook "Like" or a Twitter "Tweet."

Example:

ga_push_add_social(array(
  'socialNetwork' => 'facebook',
  'socialAction' => 'like',
  'socialTarget' => 'http://mycoolpage.com',
));

Parameters

array $push: An associative array containing:

  • socialNetwork: string (optional) The network on which the action occurs (e.g. Facebook, Twitter).
  • socialAction: string (optional) The type of action that happens (e.g. Like, Send, Tweet).
  • socialTarget: string (optional) Specifies the target of a social interaction. This value is typically a URL but can be any text.

string $method_key: @see ga_push_add()

array $options: @see ga_push_add()

See also

https://developers.google.com/analytics/devguides/collection/analyticsjs...

https://developers.google.com/analytics/devguides/collection/gajs/gaTrac...

1 call to ga_push_add_social()
ga_push_action_push_social in ./ga_push.rules.inc
Add a push pageview from a rules action.

File

./ga_push.module, line 515
Drupal Module: GA Push.

Code

function ga_push_add_social($push, $method_key = NULL, $options = array()) {
  ga_push_add($push, GA_PUSH_TYPE_SOCIAL, $method_key, $options);
}