< back to index

HTTP request

GET https://api.wevoteusa.org/apis/v1/saveAnalyticsAction (Jump to "Try It Now")

Required Parameters

Parameter name Value Description
voter_device_id string An 88 character unique identifier linked to a voter record on the server
api_key string (from post, cookie, or get (in that order)) The unique key provided to any organization using the WeVoteServer APIs
action_constant integer There is a constant for each kind of action (partial example list): ACTION_VOTER_GUIDE_VISIT = 1 ACTION_VOTER_GUIDE_ENTRY = 2 ACTION_ORGANIZATION_FOLLOW = 3 ACTION_ORGANIZATION_AUTO_FOLLOW = 4 ACTION_ISSUE_FOLLOW = 5 ACTION_BALLOT_VISIT = 6 ACTION_POSITION_TAKEN = 7 ACTION_VOTER_TWITTER_AUTH = 8 ACTION_VOTER_FACEBOOK_AUTH = 9 ACTION_WELCOME_ENTRY = 10 ACTION_FRIEND_ENTRY = 11

Optional Parameters

Parameter name Value Description
organization_we_vote_id string The unique identifier for this organization across all networks
google_civic_election_id integer The unique identifier for a particular election.
ballot_item_we_vote_id string The we_vote_id for the ballot item we are storing analytics for.

Response

{
  "status": string,
  "success": boolean,
  "voter_device_id": string (88 characters long),
  "action_constant": integer,
  "state_code": string,
  "is_signed_in": boolean,
  "google_civic_election_id": integer,
  "organization_we_vote_id": string,
  "organization_id": integer,
  "ballot_item_we_vote_id": string,
  "date_as_integer": integer,
}

Response Status Codes

Code Description
VALID_VOTER_DEVICE_ID_MISSING Cannot proceed. A valid voter_device_id parameter was not included.
VALID_VOTER_ID_MISSING Cannot proceed. A valid voter_id was not found.

Try It Now: API Variables

Parameter name Value  
voter_device_id:
action_constant:
organization_we_vote_id:
google_civic_election_id:
ballot_item_we_vote_id:

(opens in new window)