What is a Manifest file?
A manifest file is a file containing metadata, ex- GCM sender id, GCM user visibility, etc. A manifest file is used to map subscribers with GCM sender id. Manifest file format should always be Application/JSON.
This article is dedicated to those HTTPS implementation cases which are having multiple manifest files in the source code of the root domain of the website.
In these cases, the script is not able to identify which manifest file to process.
For example, you are having 2 manifest files as:
The content of the above file:
{
"name": "ABCD",
"icons": [
{
"src": "\/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": 0.75
},
{
"src": "\/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": 1
}
-
https://yourwebsite.com/manifest.json (VWO Engage’s manifest file)
Content of the above file:
"short_name": "ABCD GmbH",
"icons": [{
"src": "/logo_192_by_192.png",
"sizes": "192x192",
"type": "image/png"
}],
"start_url": "/",
"display": "standalone",
"gcm_sender_id": "1930042*****",
"gcm_user_visible_only": true}
Now, all you have to do is merge the complete content of your first manifest file into the second manifest file (the one which is of VWO Engage) hence combining the code of both manifest files in one.
The content of the merged file should look like:
{
"name": "ABCD",
"icons": [
{
"src": "\/android-chrome-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": 0.75
},
{
"src": "\/android-chrome-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": 1
}
],
"short_name": "ABCD GmbH",
"icons": [{
"src": "/logo_192_by_192.png",
"sizes": "192x192",
"type": "image/png"
}],
"start_url": "/",
"display": "standalone",
"gcm_sender_id": "1930042*****",
"gcm_user_visible_only": true
}
Here, you have completed the task of creating the unique manifest file which has content of all the other manifest files. Let’s call this file as ‘Updated manifest file’
Next steps to be performed on your end:
1. Remove the below line from code: (referring to your first manifest file)
<link rel="manifest" href="https://yourwebsite.com/skin/frontend/abcd/default/images/favicons/manifest.json">
2. Update link ‘https://yourwebsite.com/manifest.json’ with the new ‘Updated manifest file’
Since the contents of the first manifest file are already there in the Updated manifest file, it won't affect the website functionality.
Now, just hard load your webpage once you have made all the necessary changes and you must be able to see the native Opt-in which looks like below image.
Note - This Opt-in is not Customisable.