giphy-js-sdk-analytics v1.0.1
Giphy Analytics Javascript SDK
The Giphy Core SDK is a wrapper around Giphy Pingbacks API.
Getting Started
Supported Methods
Setup
Require Module
npm
npm install --save giphy-js-sdk-analyticsInitialize 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('trending', '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
Create a Pull Request; instead of pushing directly to
master.Give your branch a descriptive name like
dh-network-fixinstead of something ambiguous likemy-branch.Write a descriptive summary in the comment section on Github.
Don't merge your own Pull Request; send it to your teammate for review.
If you think something could be improved: write a comment on the Pull Request and send it to the author.
Make sure your branch is based off
master, and not some other outdated branch.Don't reuse branches. Once they're merged to
masteryou should consider deleting them.Prefer squash when doing a Pull Request, as it simplifies the commit history.