Digger API

ZaniRexhaa digtective
Help

Apiary Powered Documentation

Sign in with Apiary account.

Digger API

Introduction

Digger is an app that allows for you to have accurate ad tracking by having lead and conversion attribution to your ads.

This is achieved through connections to multiple different ad providers and CRMs, but with the possibility of handling it all on your custom solutions through public APIs.

Integrations and Plugins

Our app makes use of different APIs from different platforms and allows for easy connections one click connections. Leveraging these integrations and plugins will make it very easy for clients to use the app and sometimes no developer help will be needed.

Once you login in our app, you will see on the sidebar a tab called Integrations. There you will find all of the listed platforms and you will see the one click connections.

Ad Platforms

Currently we support integration with the following ad platforms:

  • Google Ads

  • Meta Ads

  • Bing Ads

  • Linkedin(Coming soon)

CRM Platforms

Currently we support integration with the following CRM platforms:

  • HubSpot

  • Salesforce(Coming soon)

Ecommerce Platforms
  • Magento 2

  • Adobe Ecommerce

  • Shopify(Coming soon)

Plugins
  • Wordpress plugin(Coming soon)

API Flow

Our app has a certain API flow and needs to be strictly followed for having 100% correct figures.

API Token

To initiate any kind of API call the client needs to get a token. This can be done by navigating to Developers > Console and clicking on the Generate Token button.

Creating a Lead/Form Submission

Leads or form submissions come from contact forms or from sales on e-commerces. When a user buys or submits our create needs to be called and then in turn a unique id will be given to the user.

The returned id needs to be stored for later use if no CRM connection is made and the solution is custom.

If a CRM connection is made it starts and ends here, everything else will be managed by the CRM integration.

Updating a Lead/Form Submission

A lead can be one of three statuses:

  • In progress (0)

  • Won (1)

  • Lost (2)

These statuses are each indicated by a number and stored for correct displaying of figures. Each lead update needs to have it's income so that an ad can be attributed it's correct figures.

HubSpot

HubSpot Forms (WIP)

If a client is using HubSpot forms, they can have a really easy time setting things up. You can navigate to Integrations > HubSpot and you will see a list of all your forms. From there you can choose to generate a Embed Link and you can just paste that in your website and your tracking is setup.

Reference

Form Submission/Lead

Create Form Submission/Lead

Request
object
  • sessionId
    Unique id that persists throughout the session
    string, required
  • path
    Path where form submissions happened
    string, required
  • browser
    User agent from the header
    string, required
  • referrer
    Http referrer from the header
    string
  • adCode

    Ad Id from ad providers stored in the session, the parameter comes in from the url from the query param dig.

    string
  • income

    Income from the form submission/lead as a float

    number
  • originalReferrer

    Original entry point from the HTTP referrer, should be stored once and persisted throughout the session.

    string
  • status

    Status from the form submission/lead, referr to the API flow for the value(can be empty)

    enum
  • googleClickId

    This is the click id coming in from google, it can be one of 3 types: gclid, wbraid, gbraid.

    • GoogleClickId
      • clickId - The id coming in from the query
      • type - Can be one of three (gclid, wbraid, gbraid) based on the query params.
    object
  • facebookClickId

    This is the click id coming in from google, it can be one of 3 types: gclid, wbraid, gbraid.

    • FacebookClickId
      • clickId - The id coming in from the query
      • type - Should be fbclid
    object

Update Form Submission/Lead

You also may update your own form submission/lead if you are using a custom implementation. The api call is fairly simple and only needs to values. Income is the amount lost/won and the status indicates what is happening to the income.

URI Parameters
idId returned by the earlier create form submission
Request
object
  • income

    Income from the form submission/lead as a float

    number, required
  • status

    Status from the form submission/lead, referr to the API flow for the value(can be empty)

    enum, required