Collection campaigns contains information about all created campaigns.
Here is the list of fields available:
Field | Description | Example |
---|---|---|
_id | Unique ID of the campaign. It is generated using app_id, campaign name and timestamp upon creation or set by specific value (For example organic campaigns have id "organic"+app_id | 7e28add2d3f9ca14f5d33f700b17fa35c1e4c685
_organic5c3c55e5cf50054aa7fd167b |
name | The name of campaign(given when creating) | Test Campaign |
link | Default redirect url (as written when creating campaign) | https://mypage?ok=true |
links | Other redirect urls (when having different redirect urls for different platforms) | "links": { "android": "https://play.google" } |
fingerprint | True or false. If true Countly tries to recognize users by created digital fingerprint. | true false |
cost | Number. Cost for campaign. Set as saved when creating campaign. It can mean cost per click, campaign or install. (Based on type - costtype) | 10 |
costtype | One of the: 1. install - per install 2. click - per click 3. campaign - per campaign | install click campaign |
type | One of: 1. default (Web campaign) 2. adwordsdefault (Adwords Display Network) 3. adwords_universal (Adwords Universal) 4. server_to_server (Server to Server) | default |
typedata | Additional data when creating different type of campaign. | { "server_to_server": { "resolve": "postback" } } |
created_at | Timestamp when campaign was created | 1565606830 |
edited_at | Timestamp when app was edited. (The same as created_at if campaign never edited) | 1565606830 |
app_id | Application id for which campaign is created. | 5d274f7a65310065a9eeec3e |
postbacks | Array with postback links | ["http://my_page.com/postback?d = 1234&p=test"] |
aclk | All clicks for this campaign | 10 |
ins | All installs for this campaign | 10 |
clk | All unique clicks for this campaign | 10 |
rev | Total revenue for this campaign | 10 |
ses | Total session count for this campaign | 10 |
totalCost | Total cost for this campaign | 10 |
Here's is how an example document could look like on apps collection
{
"_id": "69c60bc684e1ea39f67de28f4d24195c9c3d803a",
"name": "Test campaign",
"link": "http://my_page?ok=true",
"fingerprint": true,
"cost": 5,
"costtype": "install",
"links": {},
"type": "default",
"postbacks": [
"http://my_page.com/postback?d = 1234&p=test"
],
"app_id": "5d274f7a65310065a9eeec3e",
"typedata": {},
"created_at": 1565606830,
"edited_at": 1565606830,
"aclk": 5,
"ins": 10,
"clk": 200,
"rev": 5,
"ses": 8,
"totalCost": 12
}