{"__v":16,"_id":"56015bdc3aa0520d00da0ced","category":{"__v":26,"_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"],"project":"5540ce1b31827a0d007ab1cc","version":"5540ce1c31827a0d007ab1cf","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-14T12:23:55.603Z","from_sync":false,"order":2,"slug":"features","title":"Features"},"parentDoc":null,"project":"5540ce1b31827a0d007ab1cc","user":"5540cdbf5cf9682100d61a97","version":{"__v":31,"_id":"5540ce1c31827a0d007ab1cf","project":"5540ce1b31827a0d007ab1cc","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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-22T13:47:08.509Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":10,"body":"[block:callout]\n{\n  \"type\": \"success\",\n  \"title\": \"Compatible with iOS, Android and Windows, Cordova, Phonegap\"\n}\n[/block]\nThis tutorial explains how to use Deep Linking to link to particular native pages from push notification on your iOS or Android app. Pushwoosh SDK supports opening deep links from Push Notifications, Rich Pages and In App Messages interactions.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"1. Creating Deep Links\"\n}\n[/block]\nIn Pushwoosh Control Panel open your App and go to Deep Links section and click \"Add Deep Link\". Enter the name of the deep link and its template.\nThe template follows standard URI scheme which is **scheme:[//domain][/]path[?query]**\nThe scheme must be unique to your application. You can also reference additional parameters that could be entered later by using **{placeholders}** in curly braces. You can use several placeholders in your deep link template.\n\nThe example below illustrates a deep link with the scheme *com.pushwoosh*, page name - *promotion* and query parameter *id* with placeholder *promo_id*:\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/11PGJxQJicG1gt6DyRfw_Pushwoosh.png\",\n        \"Pushwoosh.png\",\n        \"1750\",\n        \"536\",\n        \"#1f8d26\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"Please note that examples below are provided for demo purposes and it is your responsibility to pick a deep linking strategy and perform manual integration. We suggest looking into the [Mobile Deep Linking Guide](http://mobiledeeplinking.org/) which is a collaborative industry effort to provide a consistent, high-quality source of documentation on this topic.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"2. iOS configuration\"\n}\n[/block]\nFollow the guide here: http://docs.pushwoosh.com/docs/customizing-ios-sdk#deep-linking\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"3. Android configuration\"\n}\n[/block]\nFollow the guide here: http://docs.pushwoosh.com/docs/androidmanifestxml-modifications#deep-linking\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"4. Cordova / Phonegap\"\n}\n[/block]\n\nWe recommend using https://github.com/nordnet/cordova-universal-links-plugin\nIt's super easy to set deep links for Cordova and it works with Pushwoosh deep linking functionality out of the box.\n\nFor example add to Cordova **config.xml**:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<universal-links>\\n    <host name=\\\"sample.com\\\" scheme=\\\"pushwoosh\\\" event=\\\"ul_myExampleEvent\\\" />\\n</universal-links>\",\n      \"language\": \"xml\",\n      \"name\": \"config.xml\"\n    }\n  ]\n}\n[/block]\nThis will set deep link for *pushwoosh://sample.com* and will trigger *ul_myExampleEvent*\n\nTo your javascript code add:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"universalLinks.subscribe('ul_myExampleEvent', function (eventData) {\\n    // do some work\\n    // in eventData you'll see url и and parsed url with schema, host, path and arguments\\n    console.log('Did launch application from the link: ' + JSON.stringify(eventData));\\n    alert('Did launch application from the link: ' + JSON.stringify(eventData));\\n});\\n\",\n      \"language\": \"javascript\",\n      \"name\": null\n    }\n  ]\n}\n[/block]\nThat's it!\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"5. Sending Deep Links\"\n}\n[/block]\nSending Deep Link with your push is straightforward.\nSelect **Deep Link** in the **Action** tab when sending push notification and enter placeholder values. Woosh! You can save this in a Push Preset for later use and also pass custom data to the app with a deep link if necessary.\n[block:image]\n{\n  \"images\": [\n    {\n      \"image\": [\n        \"https://files.readme.io/OGLWmf6yS9mxXrDJMYez_Pushwoosh___Applications___0_Max_application___Send_Push.png\",\n        \"Pushwoosh___Applications___0_Max_application___Send_Push.png\",\n        \"1740\",\n        \"1040\",\n        \"#28a5b8\",\n        \"\"\n      ]\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"deep-linking","type":"basic","title":"Deep Linking"}
[block:callout] { "type": "success", "title": "Compatible with iOS, Android and Windows, Cordova, Phonegap" } [/block] This tutorial explains how to use Deep Linking to link to particular native pages from push notification on your iOS or Android app. Pushwoosh SDK supports opening deep links from Push Notifications, Rich Pages and In App Messages interactions. [block:api-header] { "type": "basic", "title": "1. Creating Deep Links" } [/block] In Pushwoosh Control Panel open your App and go to Deep Links section and click "Add Deep Link". Enter the name of the deep link and its template. The template follows standard URI scheme which is **scheme:[//domain][/]path[?query]** The scheme must be unique to your application. You can also reference additional parameters that could be entered later by using **{placeholders}** in curly braces. You can use several placeholders in your deep link template. The example below illustrates a deep link with the scheme *com.pushwoosh*, page name - *promotion* and query parameter *id* with placeholder *promo_id*: [block:image] { "images": [ { "image": [ "https://files.readme.io/11PGJxQJicG1gt6DyRfw_Pushwoosh.png", "Pushwoosh.png", "1750", "536", "#1f8d26", "" ] } ] } [/block] [block:callout] { "type": "success", "body": "Please note that examples below are provided for demo purposes and it is your responsibility to pick a deep linking strategy and perform manual integration. We suggest looking into the [Mobile Deep Linking Guide](http://mobiledeeplinking.org/) which is a collaborative industry effort to provide a consistent, high-quality source of documentation on this topic." } [/block] [block:api-header] { "type": "basic", "title": "2. iOS configuration" } [/block] Follow the guide here: http://docs.pushwoosh.com/docs/customizing-ios-sdk#deep-linking [block:api-header] { "type": "basic", "title": "3. Android configuration" } [/block] Follow the guide here: http://docs.pushwoosh.com/docs/androidmanifestxml-modifications#deep-linking [block:api-header] { "type": "basic", "title": "4. Cordova / Phonegap" } [/block] We recommend using https://github.com/nordnet/cordova-universal-links-plugin It's super easy to set deep links for Cordova and it works with Pushwoosh deep linking functionality out of the box. For example add to Cordova **config.xml**: [block:code] { "codes": [ { "code": "<universal-links>\n <host name=\"sample.com\" scheme=\"pushwoosh\" event=\"ul_myExampleEvent\" />\n</universal-links>", "language": "xml", "name": "config.xml" } ] } [/block] This will set deep link for *pushwoosh://sample.com* and will trigger *ul_myExampleEvent* To your javascript code add: [block:code] { "codes": [ { "code": "universalLinks.subscribe('ul_myExampleEvent', function (eventData) {\n // do some work\n // in eventData you'll see url и and parsed url with schema, host, path and arguments\n console.log('Did launch application from the link: ' + JSON.stringify(eventData));\n alert('Did launch application from the link: ' + JSON.stringify(eventData));\n});\n", "language": "javascript", "name": null } ] } [/block] That's it! [block:api-header] { "type": "basic", "title": "5. Sending Deep Links" } [/block] Sending Deep Link with your push is straightforward. Select **Deep Link** in the **Action** tab when sending push notification and enter placeholder values. Woosh! You can save this in a Push Preset for later use and also pass custom data to the app with a deep link if necessary. [block:image] { "images": [ { "image": [ "https://files.readme.io/OGLWmf6yS9mxXrDJMYez_Pushwoosh___Applications___0_Max_application___Send_Push.png", "Pushwoosh___Applications___0_Max_application___Send_Push.png", "1740", "1040", "#28a5b8", "" ] } ] } [/block]