giphy-js-sdk-analytics

1.0.1 • Public • Published

Giphy Analytics Javascript SDK

The Giphy Core SDK is a wrapper around Giphy Pingbacks API.

Build Status npm version Downloads

Getting Started

Supported Methods

Setup

Require Module

npm

npm install --save giphy-js-sdk-core

Initialize Giphy SDK

var GphAnalytics = require('giphy-js-sdk-analytics')
client = GphAnalytics('YOUR_API_KEY')

Pingback Events

Search all Giphy GIFs for a word or phrase. Punctuation will be stripped and ignored.

Required Params

  • "endpoint" - string - term that matches the api endpoint used to collect the gifs used available arguments are: 'search', 'trending', 'related' or 'reactions'

  • "gifId" - string - the gifId that is returned by the GIPHY API available inside any gif object

  • "userId" - string - A user's unique identifier (This is specific to your application and is not returned in any way by GIPHY)

  • "responseId" - string - The unique identifier for any given GIPHY API response, available as response_id in the GIPHY API response

/// Analytics Events

client.onSeen(endpoint, gifId, userId, responseId)
client.onClick('search', 'u4styZNRWqR0Y', '1234', 'e1237saj412')
client.onHover('search', 'u4styZNRWqR0Y', '1234', 'e1237saj412')

CONTRIBUTING

Managing git repositories can be hard, so we've laid out a few simple guidelines to help keep things organized.

Guidelines

  1. Create a Pull Request; instead of pushing directly to master.

  2. Give your branch a descriptive name like dh-network-fix instead of something ambiguous like my-branch.

  3. Write a descriptive summary in the comment section on Github.

  4. Don't merge your own Pull Request; send it to your teammate for review.

  5. If you think something could be improved: write a comment on the Pull Request and send it to the author.

  6. Make sure your branch is based off master, and not some other outdated branch.

  7. Don't reuse branches. Once they're merged to master you should consider deleting them.

  8. Prefer squash when doing a Pull Request, as it simplifies the commit history.

Readme

Keywords

none

Package Sidebar

Install

npm i giphy-js-sdk-analytics

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

26.2 kB

Total Files

5

Last publish

Collaborators

  • giphy