{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"results":{"codes":[]},"settings":""},"next":{"description":"","pages":[]},"title":"Custom Events","type":"basic","slug":"creating-custom-events","excerpt":"","body":"Pulsate enables you to track actions that your user's have taken within your app by setting custom events. You can use track these custom events to get a better idea of the customer journey within your app and you can also deliver targeted campaigns to users based on their actions within the app.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Custom Event Campaign Example\",\n  \"body\": \"You create a campaign with a coupon for a variety of clothes. You decide to show this campaign on *didPressClothesButton* event trigger. When user clicks on the *Clothes* section button, you send an *didPressClothesButton* event through the SDK. The server will take care of the rest and deliver your campaign to the user.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"Simple Events\"\n}\n[/block]\nSimple events allow you to send events with only their name. To track simple events, use the *createEvent:* method on the *Pulsate Manager* object:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"manager.createEvent(\\\"didPressClothesButton\\\");\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nOnce those custom events have been set, every time a user completes that action, it will be recorded by Pulsate and you can choose those events in the *Targeting Section* when you are building a campaign.\n[block:api-header]\n{\n  \"title\": \"Revenue Events\"\n}\n[/block]\nRevenue Events allow you to send events with their name, currency and value. To track simple events, use the *createRevenueEvent:* method on the *Pulsate Manager* object:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"PulsateRevenueEvent revenueEvent = new PulsateRevenueEvent(\\\"didButItem\\\", \\\"100.0\\\", PulsateRevenueEvent.Currency.USD);\\nmanager.createRevenueEvent(revenueEvent);\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\nOnce those custom events have been set, every time a user completes that action, it will be recorded by Pulsate and you can choose those events in the *Targeting Section* when you are building a campaign. These events additionally show up in the Campaign Stats to allow tracking Campaign Revenue.","updates":[],"order":3,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5f2ab32a4edc8d05bb31877f","createdAt":"2020-08-05T13:24:58.297Z","user":"57bc3654b9c7f0220009c77b","category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"SDK Basic","slug":"sdk-basic","order":2,"from_sync":false,"reference":false,"_id":"5f2ab1e9448d87068b348f9c","createdAt":"2020-08-05T13:19:37.517Z","version":"5e5019b49e8f240011cc6ade","project":"54aa7f773b56130b0056c86e","__v":0},"version":{"version":"2.8","version_clean":"2.8.0","codename":"Android SDK","is_stable":false,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["5e5019b49e8f240011cc6a47","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","5e5019b49e8f240011cc6a48","5e5019b49e8f240011cc6a49","5e5019b49e8f240011cc6a4a","5e5019b49e8f240011cc6a4b","5e5019b49e8f240011cc6a4c","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","5e5019b49e8f240011cc6a4d","5e5019b49e8f240011cc6a4e","5c73dd27e8fdc000572a206a","5e5019b49e8f240011cc6a4f","5e501b7e7c8bdc00450ea66a","5e53daa9884b750025b5cad4","5f2ab0dfbf70f7063ad0c4f3","5f2ab1e9448d87068b348f9c","5f2ab1f9c1644603559149ac","5f2ab205bc35e507e8cead35"],"_id":"5e5019b49e8f240011cc6ade","project":"54aa7f773b56130b0056c86e","forked_from":"5e4fbbbda8fb41028f1861fe","__v":6,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z"},"project":"54aa7f773b56130b0056c86e","__v":0,"parentDoc":null}
Pulsate enables you to track actions that your user's have taken within your app by setting custom events. You can use track these custom events to get a better idea of the customer journey within your app and you can also deliver targeted campaigns to users based on their actions within the app. [block:callout] { "type": "info", "title": "Custom Event Campaign Example", "body": "You create a campaign with a coupon for a variety of clothes. You decide to show this campaign on *didPressClothesButton* event trigger. When user clicks on the *Clothes* section button, you send an *didPressClothesButton* event through the SDK. The server will take care of the rest and deliver your campaign to the user." } [/block] [block:api-header] { "title": "Simple Events" } [/block] Simple events allow you to send events with only their name. To track simple events, use the *createEvent:* method on the *Pulsate Manager* object: [block:code] { "codes": [ { "code": "manager.createEvent(\"didPressClothesButton\");", "language": "java" } ] } [/block] Once those custom events have been set, every time a user completes that action, it will be recorded by Pulsate and you can choose those events in the *Targeting Section* when you are building a campaign. [block:api-header] { "title": "Revenue Events" } [/block] Revenue Events allow you to send events with their name, currency and value. To track simple events, use the *createRevenueEvent:* method on the *Pulsate Manager* object: [block:code] { "codes": [ { "code": "PulsateRevenueEvent revenueEvent = new PulsateRevenueEvent(\"didButItem\", \"100.0\", PulsateRevenueEvent.Currency.USD);\nmanager.createRevenueEvent(revenueEvent);", "language": "java" } ] } [/block] Once those custom events have been set, every time a user completes that action, it will be recorded by Pulsate and you can choose those events in the *Targeting Section* when you are building a campaign. These events additionally show up in the Campaign Stats to allow tracking Campaign Revenue.