fastmon Docs
Applications

Create Application

Fehler melden

Provision an application: one embed whose collection config applies to every domain it runs on, with the concrete Site for each beacon resolved at ingest by the page-URL host. Sites are added by adopting/assigning domains (or auto-provision).

Authentifizierung

bearerAuth
headerAuthentifizierungBearer <token>

API token generated from the fastmon dashboard (Account → API Token) or at organization level (fmo_…, one that outlives its creator). Send as Authorization: Bearer fm_... or paste the full token (including its prefix) into the Authorize dialog.

Pfad-Parameter

org_id*Org Id
Formatuuid

Request-Body

application/json
  1. body

Provision an application (a tracking embed). The collection config applies to every domain the app is embedded on. site_defaults holds the privacy values every member site takes, a site cannot override them.

name?Name

Display name of the application.

Lengthlength <= 255
Default"Default"
environment?Environment

Deployment environment. Production applications are billed, development ones are not.

Default"prod"
Value in"prod""dev"
site_policy?SitePolicy

What happens to a beacon whose hostname is not a registered domain of this application.

Default"open"
Value in"open""auto""strict"
pagetype_ruleset?Pagetype RulesetDeprecated

Shorthand that sets platform and turns pagetype_body_class on, or turns it off with an empty string. Kept for older clients.

Default""
page_type?|

Page-type detection.

shop?|

Shop settings.

collection?|

What the tracker collects.

collector?|

Where beacons are posted.

script?|

The served tracker bundle.

site_defaults?|

Defaults the application's domains inherit.

platform?|

The system the application runs on, when it is known.

spa?|

Whether the application is a single-page app.

preset?|

Shortcut that expands into the collection flags. Accepted when creating only.

collector_mode?CollectorModeDeprecated

Where the served bundle posts its beacons. Deprecated, use collector.mode.

Default"default"
Value in"default""custom""relative"
collector_endpoint?|Deprecated

The URL beacons are posted to. Only with collector_mode=custom. Deprecated, use collector.endpoint.

Response-Body

Successful Response

application/json
  1. response
id*Id

Identifier of the application.

Formatuuid
organization_id*Organization Id

The organization this application belongs to.

Formatuuid
name*Name

Display name of the application.

environment*Environment

Deployment environment. Production applications are billed, development ones are not.

Value in"prod""dev"
site_policy*SitePolicy

What happens to a beacon whose hostname is not a registered domain of this application.

Value in"open""auto""strict"
source_hash*Source HashDeprecated

Names this application's bundle in the script URL, /s/{source_hash}.js.

collector_hash*Collector HashDeprecated

Names this application in the beacon URL, /c/{collector_hash}.

pagetype_ruleset?Pagetype RulesetDeprecated

The platform when pagetype_body_class is on and the platform has a ruleset, else an empty string. Derived, write the two fields instead.

Default""
platform?

The system the application runs on and how that is known.

collector_mode*CollectorModeDeprecated

Where the served bundle posts its beacons. Deprecated, use collector.mode.

Value in"default""custom""relative"
collector_endpoint?Collector EndpointDeprecated

The URL beacons are posted to. Only with collector_mode=custom. Deprecated, use collector.endpoint.

proxy_secret?Proxy SecretDeprecated

Secret a first-party beacon proxy presents in FM-Proxy-Key. Returned only to a caller who may change the application, and absent when the feature is off.

is_active*Is Active

Whether the application is enabled.

site_count?Site Count

How many domains run on this application.

Default0
created_at*Created At

When the application was created.

Formatdate-time
updated_at*Updated At

When it last changed.

Formatdate-time
page_type*

Page-type detection.

shop*

Shop settings.

spa*Spa

Whether the application is a single-page app, set by hand.

collection*

What the tracker collects.

collector*

Where beacons are posted.

script*

The served tracker bundle.

site_defaults*

Defaults the application's domains inherit.

POST
/organizations/{org_id}/applications
curl -X POST 'https://api.fastmon.eu/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/applications' \  -H 'Content-Type: application/json' \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",  "name": "string",  "environment": "prod",  "site_policy": "open",  "source_hash": "string",  "collector_hash": "string",  "pagetype_ruleset": "",  "platform": {    "key": "",    "source": "detected",    "detected_via": "",    "detected_at": "2019-08-24T14:15:22Z"  },  "collector_mode": "default",  "collector_endpoint": "string",  "proxy_secret": "string",  "is_active": true,  "site_count": 0,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z",  "page_type": {    "body_class": true,    "ruleset": "string",    "rules": [      {        "body_class": "string",        "page_type": "string"      }    ],    "url_rules": [      {        "pattern": "string",        "page_type": "string"      }    ]  },  "shop": {    "active": true,    "source": "platform",    "checkout": {      "tracking": true,      "cart_paths": [        "string"      ],      "paths": [        "string"      ],      "success_paths": [        "string"      ]    }  },  "spa": true,  "collection": {    "sessions": true,    "session_consent": "deferred",    "fetch_xhr": true,    "error_messages": true,    "error_frames": true,    "query_keys": true,    "query_values_for": [      "string"    ],    "template_url_ids": true,    "sampling_rate": 0,    "fetch_xhr_sampling_rate": 0  },  "collector": {    "hash": "string",    "mode": "default",    "endpoint": "string",    "proxy_secret": {      "secret": "string",      "redacted": true,      "previous_set": true    }  },  "script": {    "hash": "string",    "version": "string"  },  "site_defaults": {    "data_retention_days": 0,    "store_stitch": true,    "count_visitors_by": "stitch"  }}