Skip to main content
Dittofeed’s Web SDK allows you to send events from your web app to Dittofeed’s API.

Installation

Usage

Anonymous Users

The SDK will automatically generate an anonymous ID for users who are not logged in. This ID is stored in the user’s browser and is used to track them across different sessions. You can submit events with the anonymous ID using any of the methods that accept a userId parameter, by omitting the userId parameter.
You can access the anonymous ID using the getAnonymousId method.
You can also reset the anonymous ID using the resetAnonymousId method.

Install the Snippet

You can also import the Dittofeed snippet into your web app. This snippet will automatically load the Dittofeed SDK and initialize it with your write key. This is convenient if you want to use the Dittofeed SDK without a build system e.g. in a site builder like Webflow.