{"_id":"58ffb87ca9691f0f00130040","category":{"_id":"55a4ff5b2e70c0250038050f","pages":["55a4ff7d750a9a23005332af","55a4ff8b750a9a23005332b1","55a4ff9b750a9a23005332b3","55a60bfcaaf9cf1900114efb","55a6184880c8a30d00b32526","55a61ba780c8a30d00b32532","55a61c97aaf9cf1900114f40","55a61ea9aaf9cf1900114f48","55a6206580c8a30d00b32544","55a64277aaf9cf1900114fc2","55a694d1aaf9cf1900115102","55a6a23eaaf9cf19001151e2","55a6a9b389c9da1900e2a41d","55a6aba45f88a70d0065b255","55a90687c8bd450d000dd157","55af84f3aa902f1700300daa","55afa3e3902fd51700f5f858","55b0cc5cb3171b3700b153fa","56015bdc3aa0520d00da0ced","5603fe3490ee490d004404c2","5633dd18d28a340d004004f5","56448c697a8cb50d00a3ea3f","56d7a2ec5208281500a2506c","56d859b8b159f10b00304577","56d9822add90610b002708a1","56ef44c6e8d6fa17006f244f"],"version":"5540ce1c31827a0d007ab1cf","project":"5540ce1b31827a0d007ab1cc","__v":26,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-14T12:23:55.603Z","from_sync":false,"order":2,"slug":"features","title":"Features"},"parentDoc":null,"user":"5540e0f5bb9e762d00f594c0","version":{"_id":"5540ce1c31827a0d007ab1cf","project":"5540ce1b31827a0d007ab1cc","__v":31,"createdAt":"2015-04-29T12:27:08.390Z","releaseDate":"2015-04-29T12:27:08.390Z","categories":["5540ce1c31827a0d007ab1d0","5540d91bbb9e762d00f594ad","5540e5f131827a0d007ab212","5540e5febb9e762d00f594d3","5540e61331827a0d007ab213","5540e6195cf9682100d61afa","5540e62631827a0d007ab214","5540e63031827a0d007ab215","5540e63531827a0d007ab216","5540e63e5cf9682100d61afc","5540e6445cf9682100d61afd","5540e64a5cf9682100d61afe","55a4ff5b2e70c0250038050f","55acb28318eefd0d0071d504","55ae1abe8576b92300291c80","55ae453ef302af23000ac109","55af586d555b900d0036d296","55af91dac8a85321007a53c3","55b9fee204775a2f00628071","55b9ff0e04775a2f00628072","55b9ff4604775a2f00628073","55b9ff5fd72d1e1900276a38","55b9ff7f04775a2f00628074","55b9ff90eb08801900f833e5","55b9ffa5d72d1e1900276a39","55b9ffca04775a2f00628075","55b9fffdd72d1e1900276a3a","56bc2f033ee9e70d008b46af","56c2f6efbbf9ec2d00e0fe4f","57595bbb18760817001e8bbe","57d8d9793916800e003dde53"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"project":"5540ce1b31827a0d007ab1cc","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-04-25T20:58:36.822Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":35,"body":"Boosting repeat purchases is easy with push notifications! This tutorial will show you how to do this.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Track purchases in your app\"\n}\n[/block]\nWe need to segment the users who already made a purchase from the ones who didn't.\nTo achieve this, we need to track purchases in the app (*and yes, you can do that on web with push notifications too! [ask us how](https://www.pushwoosh.com/contact-us/)!)*.\n\nUse the following code snippet for iOS and Android in your app every time user makes a purchase.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"\\t\\t[[PushNotificationManager pushManager] sendPurchase::::at:::\\\"Fancy Dress\\\" withPrice:[NSDecimalNumber decimalNumberWithString:@\\\"19.95\\\"] currencyCode:@\\\"USD\\\" andDate:[NSDate date]];\\n\",\n      \"language\": \"objectivec\"\n    },\n    {\n      \"code\": \"PushManager.trackInAppRequest(getApplicationContext(), \\\"Fancy Dress\\\", new BigDecimal(\\\"19.95\\\"), \\\"USD\\\", new Date());\",\n      \"language\": \"java\"\n    }\n  ]\n}\n[/block]\n*See more about integration of in-app purchase tracking for [iOS](http://docs.pushwoosh.com/docs/customizing-ios-sdk#in-apps-tracking) and [Android](http://docs.pushwoosh.com/docs/androidmanifestxml-modifications#in-app-purchase-tracking)\n*\n\nThe code above will populate \"*In-app Purchase*\" default Pushwoosh tag, designed to track how much your users are spending in the app. Its value automatically increments every time a user makes a purchase.\n\n[block:api-header]\n{\n  \"title\": \"2. Creating paid user segments\"\n}\n[/block]\nGo to the \"Filters\" section and create a filter for *\"In-App Purchase\" tag is not zero*. Name it \"Paid users\".\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/93ca6fd-Pushwoosh_.jpg\",\n        \"Pushwoosh_๐Ÿ”Š.jpg\",\n        1686,\n        630,\n        \"#e1e3e4\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"title\": \"3. Sending push notification to the buyers\"\n}\n[/block]\nEnter the message you want to send to your users, in our case we are going to offer a 30% discount on \"Textured Coat\" to boost sales.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/165190d-Pushwoosh___Applications___Pushwoosh_Demo_App___Send_Push_.jpg\",\n        \"Pushwoosh___Applications___Pushwoosh_Demo_App___Send_Push_๐Ÿ”Š.jpg\",\n        1726,\n        906,\n        \"#f0f0f0\"\n      ]\n    }\n  ]\n}\n[/block]\nThen go to the \"Filters\" tab, and select our \"Paid users\" segment.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/31e7cb1-Pushwoosh___Applications___Pushwoosh_Demo_App___Send_Push_.jpg\",\n        \"Pushwoosh___Applications___Pushwoosh_Demo_App___Send_Push_๐Ÿ”Š.jpg\",\n        1748,\n        510,\n        \"#f2f2f3\"\n      ]\n    }\n  ]\n}\n[/block]\nThat's it! Your message will go to users who have already made a purchase in your app.","excerpt":"","slug":"boost-repeat-purchases","type":"basic","title":"Boost Repeat Purchases"}

Boost Repeat Purchases


Boosting repeat purchases is easy with push notifications! This tutorial will show you how to do this. [block:api-header] { "type": "basic", "title": "1. Track purchases in your app" } [/block] We need to segment the users who already made a purchase from the ones who didn't. To achieve this, we need to track purchases in the app (*and yes, you can do that on web with push notifications too! [ask us how](https://www.pushwoosh.com/contact-us/)!)*. Use the following code snippet for iOS and Android in your app every time user makes a purchase. [block:code] { "codes": [ { "code": "\t\t[[PushNotificationManager pushManager] sendPurchase:@\"Fancy Dress\" withPrice:[NSDecimalNumber decimalNumberWithString:@\"19.95\"] currencyCode:@\"USD\" andDate:[NSDate date]];\n", "language": "objectivec" }, { "code": "PushManager.trackInAppRequest(getApplicationContext(), \"Fancy Dress\", new BigDecimal(\"19.95\"), \"USD\", new Date());", "language": "java" } ] } [/block] *See more about integration of in-app purchase tracking for [iOS](http://docs.pushwoosh.com/docs/customizing-ios-sdk#in-apps-tracking) and [Android](http://docs.pushwoosh.com/docs/androidmanifestxml-modifications#in-app-purchase-tracking) * The code above will populate "*In-app Purchase*" default Pushwoosh tag, designed to track how much your users are spending in the app. Its value automatically increments every time a user makes a purchase. [block:api-header] { "title": "2. Creating paid user segments" } [/block] Go to the "Filters" section and create a filter for *"In-App Purchase" tag is not zero*. Name it "Paid users". [block:image] { "images": [ { "image": [ "https://files.readme.io/93ca6fd-Pushwoosh_.jpg", "Pushwoosh_๐Ÿ”Š.jpg", 1686, 630, "#e1e3e4" ] } ] } [/block] [block:api-header] { "title": "3. Sending push notification to the buyers" } [/block] Enter the message you want to send to your users, in our case we are going to offer a 30% discount on "Textured Coat" to boost sales. [block:image] { "images": [ { "image": [ "https://files.readme.io/165190d-Pushwoosh___Applications___Pushwoosh_Demo_App___Send_Push_.jpg", "Pushwoosh___Applications___Pushwoosh_Demo_App___Send_Push_๐Ÿ”Š.jpg", 1726, 906, "#f0f0f0" ] } ] } [/block] Then go to the "Filters" tab, and select our "Paid users" segment. [block:image] { "images": [ { "image": [ "https://files.readme.io/31e7cb1-Pushwoosh___Applications___Pushwoosh_Demo_App___Send_Push_.jpg", "Pushwoosh___Applications___Pushwoosh_Demo_App___Send_Push_๐Ÿ”Š.jpg", 1748, 510, "#f2f2f3" ] } ] } [/block] That's it! Your message will go to users who have already made a purchase in your app.