NAV
web ios android

Gfycat Analytics

Introduction

For apps and sites that integrate the Gfycat SDK or API, or for apps that request media content directly from our CDN, we provide API endpoints to measure impressions and shares for each Gfycat GIF. This allows Gfycat to better track views for the content, which can be shared with your consumers and the creator of the Gfycat.

Example usecase:

An app displays content from Gfycat that it accesses directly from the Gfycat CDN. The app fetches the media file (MP4, WebP, WebM, GIF, etc.). When the content is displayed to/played back for the end-user, that app MUST make a call to the impression endpoint. The call must be made as soon as the video starts playing (in the case of MP4 or WebM) or the animated image gets displayed (in the case of GIF or WebP).

Impressions Endpoint

Impressions example:

https://px.gfycat.com/px.gif?client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&stc=00000000-0000-0000-0000-000000000000
&cid=amp-00000000000000000000000000000000
&gfyid=candidimmaterialdromedary&context=search
&keyword=example_keyword&flow=full&viewtag=example_tag
https://px.gfycat.com/px.gif?client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary&context=search
&keyword=example_keyword&flow=full&viewtag=example_tag
https://px.gfycat.com/px.gif?client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary&context=search
&keyword=example_keyword&flow=full&viewtag=example_tag

Batch impressions example:

https://px.gfycat.com/px.gif?client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&stc=00000000-0000-0000-0000-000000000000
&cid=amp-00000000000000000000000000000000
&gfyid=candidimmaterialdromedary&context=search
&keyword=example_keyword&flow=full&viewtag=example_tag
&gfyid_1=dearestillinformedblackbird
&gfyid_2=tastydelectabledouglasfirbarkbeetle
https://px.gfycat.com/px.gif?client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary&context=search
&keyword=example_keyword&flow=full&viewtag=example_tag
&gfyid_1=dearestillinformedblackbird
&gfyid_2=tastydelectabledouglasfirbarkbeetle
https://px.gfycat.com/px.gif?client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary&context=search
&keyword=example_keyword&flow=full&viewtag=example_tag
&gfyid_1=dearestillinformedblackbird
&gfyid_2=tastydelectabledouglasfirbarkbeetle

Sending an HTTPS GET or POST to this endpoint will indicate that the Gfycat was viewed by a user.

POST is STRONGLY recommended in the case of apps so app caching does not interfere with analytics. For websites, POST and GET work equally well. GET has the added advantage on a website of not requiring JavaScript, therefore resulting in a slight performance optimization. The app SHOULD not introduce any wait time before sending the impression call to the endpoint.

If a user leaves a screen where the Gfycat content is playing, then returns to that screen, the app should make another call to the impression endpoint as this is an additional view.

Endpoint: https://px.gfycat.com/px.gif

The following table describes the query parameters:

Parameter Name Required Batch* Description
client_id Client ID Yes No API key client ID.
ver Version Yes No Version number for app.
utc User tracking cookie Yes if no idfv No An identifier string that is unique to a particular user and can be used to aggregate the views of a single user. The utc serves a similar purpose to idfa or idfv, but is not specific to iOS. Android devices should use their “android_id” for this field.
stc Session tracking cookie No No An identifier string that is unique to a user’s session and can be used to aggregate all views performed during that session.
idfa Identifier for advertisers No No An iOS-specific identifier that is unique to a particular device and can be used to aggregate the views from that device. The idfa serves a similar purpose to utc or idfv.
idfv Identifier for vendor Yes if no utc No An iOS-specific identifier that is unique to a particular device for your organization and can be used to aggregate the views from that device. The idfv serves a similar purpose to utc or idfa.
cid AMP client ID No No A tracking cookie used by the AMP platform.
gfyid Gfycat ID Yes Yes Gfycat name of the video being viewed.
context Context No Yes A context identifier whose value is usually either “categories” for when a user is viewing a gfycat from a selected category, or “search” for when a user is viewing a search result.
keyword Keyword No Yes The name of the selected category or search term for which the viewed gfycat belongs to.
flow Flow No Yes Tracks whether the user is viewing a gfycat in “full” or “half” screen.
viewtag Tag No Yes The name of the tag with which the user is filtering results by.

*In order to save bandwidth, it is possible to batch impressions for multiple gfycats in one request by adding an underscore followed by an index number (i.e. “gfyid_1”) to certain parameters (as denoted by the “Batch” column in the table above).

As a convenience, not all the batch parameters need to be specified for every index number. The set of batch parameters with no index number will be copied by default to the remaining ones unless they are overridden. (e.g. if “gfyid”, “context”, and “gfyid_1” are specified, then “context_1” does not need to be specified and will default to the value of “context”.

Analytics Endpoint

Sending an HTTP GET or POST to the analytics endpoint will track information about a certain event. The following sections describe the various events that can be tracked.

POST is STRONGLY recommended in the case of apps so app caching does not interfere with analytics. For websites, POST and GET work equally well. GET has the added advantage on a website of not requiring JavaScript, therefore resulting in a slight performance optimization. The app SHOULD not introduce any wait time before sending the metrics call to the endpoint.

Endpoint: https://metrics.gfycat.com

First launch

First launch example:

https://metrics.gfycat.com?event=first_launch
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
https://metrics.gfycat.com?event=first_launch
&client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
https://metrics.gfycat.com?event=first_launch
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000

This event can be used to track when an app has been launched for the very first time.

Parameter Name Required Description
event Event Yes Value must be “first_launch”
client_id Client ID Yes API key client ID.
ver Version Yes Version number for app.
utc User tracking cookie No An identifier string that is unique to a particular user and can be used to aggregate the events of a single user. The utc serves a similar purpose to idfa or idfv, but is not specific to iOS. Android devices should use their “android_id” for this field.
idfa Identifier for advertisers No An iOS-specific identifier that is unique to a particular device and can be used to aggregate the events from that device. The idfa serves a similar purpose to utc or idfv.
idfv Identifier for vendor No An iOS-specific identifier that is unique to a particular device for your organization and can be used to aggregate the events from that device. The idfv serves a similar purpose to utc or idfa.

Example use-case

This endpoint allows an app developer to get a better idea of the funnel from opening the app, to displaying the Gfycat media content. This call is OPTIONAL and should be used if the app doesn’t have its own analytics service (Flurry, Digits, etc.).

Send video

Send video example:

https://metrics.gfycat.com?event=send_video
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary
https://metrics.gfycat.com?event=send_video
&client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary
https://metrics.gfycat.com?event=send_video
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary

This event can be used to track when gfycats are shared.

Parameter Name Required Description
event Event Yes Value must be “send_video”
client_id Client ID Yes API key client ID.
ver Version Yes Version number for app.
utc User tracking cookie No An identifier string that is unique to a particular user and can be used to aggregate the events of a single user. The utc serves a similar purpose to idfa or idfv, but is not specific to iOS. Android devices should use their “android_id” for this field.
idfa Identifier for advertisers No An iOS-specific identifier that is unique to a particular device and can be used to aggregate the events from that device. The idfa serves a similar purpose to utc or idfv.
idfv Identifier for vendor No An iOS-specific identifier that is unique to a particular device for your organization and can be used to aggregate the events from that device. The idfv serves a similar purpose to utc or idfa.
gfyid Gfycat ID Yes Gfycat name of the target video.
keyword Keyword No Comma-separated list of keywords that may be associated with the video.

Example usecase

An app displays a Gfycat on a screen. That app allows sharing of the Gfycat on some social media, iMessage or other messaging app. If the user clicks to share the GIF, then the app SHOULD make a call to the endpoint.

Tap category

Tap category example:

https://metrics.gfycat.com?event=tap_category
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&keyword=example_category
https://metrics.gfycat.com?event=tap_category
&client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
&keyword=example_category
https://metrics.gfycat.com?event=tap_category
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&keyword=example_category

This event can be used to track when a category has been selected.

Parameter Name Required Description
event Event Yes Value must be “tap_category”
client_id Client ID Yes API key client ID.
ver Version Yes Version number for app.
utc User tracking cookie No An identifier string that is unique to a particular user and can be used to aggregate the events of a single user. The utc serves a similar purpose to idfa or idfv, but is not specific to iOS. Android devices should use their “android_id” for this field.
idfa Identifier for advertisers No An iOS-specific identifier that is unique to a particular device and can be used to aggregate the events from that device. The idfa serves a similar purpose to utc or idfv.
idfv Identifier for vendor No An iOS-specific identifier that is unique to a particular device for your organization and can be used to aggregate the events from that device. The idfv serves a similar purpose to utc or idfa.
keyword Category name Yes The name of the selected category.

Create video

Create video example:

https://metrics.gfycat.com?event=create_video
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&length=15000
https://metrics.gfycat.com?event=create_video
&client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
&context=front&length=15000&flow=tap
https://metrics.gfycat.com?event=create_video
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&context=front&length=15000&flow=tap

This event can be used to track when a video has been created.

Parameter Name Required Description
event Event Yes Value must be “create_video”
client_id Client ID Yes API key client ID.
ver Version Yes Version number for app.
utc User tracking cookie No An identifier string that is unique to a particular user and can be used to aggregate the events of a single user. The utc serves a similar purpose to idfa or idfv, but is not specific to iOS. Android devices should use their “android_id” for this field.
idfa Identifier for advertisers No An iOS-specific identifier that is unique to a particular device and can be used to aggregate the events from that device. The idfa serves a similar purpose to utc or idfv.
idfv Identifier for vendor No An iOS-specific identifier that is unique to a particular device for your organization and can be used to aggregate the events from that device. The idfv serves a similar purpose to utc or idfa.
context Context No Mobile-specific. Specifies whether the “front” or “rear” camera was used.
length Video length No Specifies how long the video is in milliseconds.
flow Flow No Mobile_specific. Specifies whether the “tap” or “hold” gesture was used.

Example usecase

An app has a feature for users to upload media to Gfycat. If the user clicks to upload to Gfycat, then the app SHOULD make a call to the endpoint.

Search videos

Search videos example:

https://metrics.gfycat.com?event=search_videos
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&keyword=example_search
https://metrics.gfycat.com?event=search_videos
&client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
&keyword=example_search
https://metrics.gfycat.com?event=search_videos
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&keyword=example_search

This event can be used to track what a user is searching for.

Parameter Name Required Description
event Event Yes Value must be “search_videos”
client_id Client ID Yes API key client ID.
ver Version Yes Version number for app.
utc User tracking cookie No An identifier string that is unique to a particular user and can be used to aggregate the events of a single user. The utc serves a similar purpose to idfa or idfv, but is not specific to iOS. Android devices should use their “android_id” for this field.
idfa Identifier for advertisers No An iOS-specific identifier that is unique to a particular device and can be used to aggregate the events from that device. The idfa serves a similar purpose to utc or idfv.
idfv Identifier for vendor No An iOS-specific identifier that is unique to a particular device for your organization and can be used to aggregate the events from that device. The idfv serves a similar purpose to utc or idfa.
keyword Search term Yes The search term used.

Example usecase

An app has a feature for users to search in Gfycat for content. If the user clicks to search in Gfycat, then the app SHOULD make a call to the endpoint.

Scroll in categories

Scroll in categories example:

https://metrics.gfycat.com?event=scroll_in_categories
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&count=20
https://metrics.gfycat.com?event=scroll_in_categories
&client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
&count=20
https://metrics.gfycat.com?event=scroll_in_categories
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&count=20

This event can be used to track when a user has scrolled through categories.

Parameter Name Required Description
event Event Yes Value must be “scroll_in_categories”
client_id Client ID Yes API key client ID.
ver Version Yes Version number for app.
utc User tracking cookie No An identifier string that is unique to a particular user and can be used to aggregate the events of a single user. The utc serves a similar purpose to idfa or idfv, but is not specific to iOS. Android devices should use their “android_id” for this field.
idfa Identifier for advertisers No An iOS-specific identifier that is unique to a particular device and can be used to aggregate the events from that device. The idfa serves a similar purpose to utc or idfv.
idfv Identifier for vendor No An iOS-specific identifier that is unique to a particular device for your organization and can be used to aggregate the events from that device. The idfv serves a similar purpose to utc or idfa.
count Scroll position Yes Number of categories scrolled through.

Scroll in videos

Scroll in videos example:

https://metrics.gfycat.com?event=scroll_in_videos
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&count=20&context=categories&keyword=example_category
https://metrics.gfycat.com?event=scroll_in_videos
&client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
&count=20&context=categories&keyword=example_category
https://metrics.gfycat.com?event=scroll_in_videos
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&count=20&context=categories&keyword=example_category

This event can be used to track when a user has scrolled through videos.

Parameter Name Required Description
event Event Yes Value must be “scroll_in_videos”
client_id Client ID Yes API key client ID.
ver Version Yes Version number for app.
utc User tracking cookie No An identifier string that is unique to a particular user and can be used to aggregate the events of a single user. The utc serves a similar purpose to idfa or idfv, but is not specific to iOS. Android devices should use their “android_id” for this field.
idfa Identifier for advertisers No An iOS-specific identifier that is unique to a particular device and can be used to aggregate the events from that device. The idfa serves a similar purpose to utc or idfv.
idfv Identifier for vendor No An iOS-specific identifier that is unique to a particular device for your organization and can be used to aggregate the events from that device. The idfv serves a similar purpose to utc or idfa.
count Scroll position Yes Number of videos scrolled through.
context Context No A context identifier whose value is usually either “categories” for when a user is viewing a gfycat from a selected category, or “search” for when a user is viewing a search result.
keyword Keyword No The name of the selected category or search term.

Caption video

Caption video example:

https://metrics.gfycat.com?event=caption_video
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&text=example_caption_text
https://metrics.gfycat.com?event=caption_video
&client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
&text=example_caption_text
https://metrics.gfycat.com?event=caption_video
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&text=example_caption_text

This event can be used to track when a user has added a caption on a video.

Parameter Name Required Description
event Event Yes Value must be “caption_video”
client_id Client ID Yes API key client ID.
ver Version Yes Version number for app.
utc User tracking cookie No An identifier string that is unique to a particular user and can be used to aggregate the events of a single user. The utc serves a similar purpose to idfa or idfv, but is not specific to iOS. Android devices should use their “android_id” for this field.
idfa Identifier for advertisers No An iOS-specific identifier that is unique to a particular device and can be used to aggregate the events from that device. The idfa serves a similar purpose to utc or idfv.
idfv Identifier for vendor No An iOS-specific identifier that is unique to a particular device for your organization and can be used to aggregate the events from that device. The idfv serves a similar purpose to utc or idfa.
text Caption text Yes The caption text added to the video.

Copy link example:

https://metrics.gfycat.com?event=copy_link
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary
https://metrics.gfycat.com?event=copy_link
&client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary
https://metrics.gfycat.com?event=copy_link
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary

This event can be used to track when a user has copied a gfycat url into the clipboard.

Parameter Name Required Description
event Event Yes Value must be “copy_link”
client_id Client ID Yes API key client ID.
ver Version Yes Version number for app.
utc User tracking cookie No An identifier string that is unique to a particular user and can be used to aggregate the events of a single user. The utc serves a similar purpose to idfa or idfv, but is not specific to iOS. Android devices should use their “android_id” for this field.
idfa Identifier for advertisers No An iOS-specific identifier that is unique to a particular device and can be used to aggregate the events from that device. The idfa serves a similar purpose to utc or idfv.
idfv Identifier for vendor No An iOS-specific identifier that is unique to a particular device for your organization and can be used to aggregate the events from that device. The idfv serves a similar purpose to utc or idfa.
gfyid Gfycat ID Yes The name of the gfycat whose link is being copied.

Download video

Download video example:

https://metrics.gfycat.com?event=download_video
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary
https://metrics.gfycat.com?event=download_video
&client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary
https://metrics.gfycat.com?event=download_video
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary

This event can be used to track when a user has downloaded a gfycat onto their device.

Parameter Name Required Description
event Event Yes Value must be “download_video”
client_id Client ID Yes API key client ID.
ver Version Yes Version number for app.
utc User tracking cookie No An identifier string that is unique to a particular user and can be used to aggregate the events of a single user. The utc serves a similar purpose to idfa or idfv, but is not specific to iOS. Android devices should use their “android_id” for this field.
idfa Identifier for advertisers No An iOS-specific identifier that is unique to a particular device and can be used to aggregate the events from that device. The idfa serves a similar purpose to utc or idfv.
idfv Identifier for vendor No An iOS-specific identifier that is unique to a particular device for your organization and can be used to aggregate the events from that device. The idfv serves a similar purpose to utc or idfa.
gfyid Gfycat ID Yes The name of the gfycat whose video is being downloaded.

Bookmark video

Bookmark video example:

https://metrics.gfycat.com?event=bookmark_video
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary
https://metrics.gfycat.com?event=bookmark_video
&client_id=XXXXX&ver=1.0.0
&idfa=00000000-0000-0000-0000-000000000000
&idfv=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary
https://metrics.gfycat.com?event=bookmark_video
&client_id=XXXXX&ver=1.0.0
&utc=00000000-0000-0000-0000-000000000000
&gfyid=candidimmaterialdromedary

This event can be used to track when a user has downloaded a gfycat onto their device.

Parameter Name Required Description
event Event Yes Value must be “bookmark_video”
client_id Client ID Yes API key client ID.
ver Version Yes Version number for app.
utc User tracking cookie No An identifier string that is unique to a particular user and can be used to aggregate the events of a single user. The utc serves a similar purpose to idfa or idfv, but is not specific to iOS. Android devices should use their “android_id” for this field.
idfa Identifier for advertisers No An iOS-specific identifier that is unique to a particular device and can be used to aggregate the events from that device. The idfa serves a similar purpose to utc or idfv.
idfv Identifier for vendor No An iOS-specific identifier that is unique to a particular device for your organization and can be used to aggregate the events from that device. The idfv serves a similar purpose to utc or idfa.
gfyid Gfycat ID Yes The name of the gfycat that is being bookmarked.