зеркало из https://github.com/mozilla/bedrock.git
Move app store redirector docs to attribution docs
This commit is contained in:
Родитель
aff470700f
Коммит
a367117580
|
@ -20,31 +20,58 @@ To help streamline creating app store referral links we have `app_store_url()` a
|
|||
|
||||
For example:
|
||||
|
||||
```
|
||||
play_store_url('firefox', 'firefox-home')
|
||||
app_store_url('firefox', 'firefox-home')
|
||||
```
|
||||
.. code-block:: jinja
|
||||
|
||||
play_store_url('firefox', 'firefox-home')
|
||||
app_store_url('firefox', 'firefox-home')
|
||||
|
||||
Would render:
|
||||
|
||||
```
|
||||
https://apps.apple.com/us/app/apple-store/id989804926?pt=373246&ct=firefox-home&mt=8
|
||||
https://play.google.com/store/apps/details?id=org.mozilla.firefox&referrer=utm_source%3Dwww.mozilla.org%26utm_medium%3Dreferral%26utm_campaign%3Dfirefox-home&hl=en
|
||||
```
|
||||
.. code-block::
|
||||
|
||||
https://apps.apple.com/us/app/apple-store/id989804926?pt=373246&ct=firefox-home&mt=8
|
||||
https://play.google.com/store/apps/details?id=org.mozilla.firefox&referrer=utm_source%3Dwww.mozilla.org%26utm_medium%3Dreferral%26utm_campaign%3Dfirefox-home&hl=en
|
||||
|
||||
For Firefox Focus:
|
||||
|
||||
```
|
||||
play_store_url('focus', 'firefox-browsers-mobile-focus')
|
||||
app_store_url('focus', 'firefox-browsers-mobile-focus')
|
||||
```
|
||||
.. code-block:: jinja
|
||||
|
||||
play_store_url('focus', 'firefox-browsers-mobile-focus')
|
||||
app_store_url('focus', 'firefox-browsers-mobile-focus')
|
||||
|
||||
Would render:
|
||||
|
||||
```
|
||||
https://apps.apple.com/us/app/apple-store/id1055677337?pt=373246&ct=firefox-home&mt=8
|
||||
https://play.google.com/store/apps/details?id=org.mozilla.focus&referrer=utm_source%3Dwww.mozilla.org%26utm_medium%3Dreferral%26utm_campaign%3Dfirefox-home&hl=en
|
||||
```
|
||||
.. code-block::
|
||||
|
||||
https://apps.apple.com/us/app/apple-store/id1055677337?pt=373246&ct=firefox-home&mt=8
|
||||
https://play.google.com/store/apps/details?id=org.mozilla.focus&referrer=utm_source%3Dwww.mozilla.org%26utm_medium%3Dreferral%26utm_campaign%3Dfirefox-home&hl=en
|
||||
|
||||
App store redirects
|
||||
-------------------
|
||||
|
||||
Occasionally we need to create a link that can auto redirect to either the Apple
|
||||
App Store or the Google Play Store depending on user agent. A common use case is
|
||||
to embed inside a QR Code, which people can then scan on their phone to get a
|
||||
shortcut to the app. To make this easier bedrock has a special redirect URL to
|
||||
which you can add product and campaign query strings. When someone hits the
|
||||
redirect URL, bedrock will attempt to detect their mobile platform and then auto
|
||||
redirect to the appropriate app store.
|
||||
|
||||
The base redirect URL is ``https://www.mozilla.org/firefox/browsers/mobile/app/``,
|
||||
and to it you can add both a ``product`` and ``campaign`` query parameter. For
|
||||
example, the following URL would redirect to either Firefox on the Apple App Store
|
||||
or on the Google Play Store, with the specified campaign parameter.
|
||||
|
||||
.. code-block::
|
||||
|
||||
https://www.mozilla.org/firefox/browsers/mobile/app/?product=firefox&campaign=firefox-whatsnew
|
||||
|
||||
.. note::
|
||||
|
||||
The ``product`` and ``campaign`` parameters are limited to a set of strictly
|
||||
trusted values. To add more product and campaign options, you can add those
|
||||
values to the ``mobile_app`` helper function in
|
||||
`firefox/redirects.py <https://github.com/mozilla/bedrock/blob/main/bedrock/firefox/redirects.py>`_.
|
||||
|
||||
Where can I find mobile attribution data?
|
||||
-----------------------------------------
|
||||
|
|
|
@ -195,30 +195,3 @@ against a remote instance of the site (e.g. production) it will run a lot
|
|||
quicker by running the tests in parallel. To do this, you can add ``-n auto``
|
||||
to the command line. Replace ``auto`` with an integer if you want to set the
|
||||
maximum number of concurrent processes.
|
||||
|
||||
Mobile app store redirects
|
||||
--------------------------
|
||||
|
||||
Occasionally we need to create a link that can auto redirect to either the Apple
|
||||
App Store or the Google Play Store depending on user agent. A common use case is
|
||||
to embed inside a QR Code, which people can then scan on their phone to get a
|
||||
shortcut to the app. To make this easier bedrock has a special redirect URL to
|
||||
which you can add product and campaign query strings. When someone hits the
|
||||
redirect URL, bedrock will attempt to detect their mobile platform and then auto
|
||||
redirect to the appropriate app store.
|
||||
|
||||
The base redirect URL is ``https://www.mozilla.org/firefox/browsers/mobile/app/``,
|
||||
and to it you can add both a ``product`` and ``campaign`` query parameter. For
|
||||
example, the following URL would redirect to either Firefox on the Apple App Store
|
||||
or on the Google Play Store, with the specified campaign parameter.
|
||||
|
||||
.. code-block::
|
||||
|
||||
https://www.mozilla.org/firefox/browsers/mobile/app/?product=firefox&campaign=firefox-whatsnew
|
||||
|
||||
.. note::
|
||||
|
||||
The ``product`` and ``campaign`` parameters are limited to a set of strictly
|
||||
trusted values. To add more product and campaign options, you can add those
|
||||
values to the ``mobile_app`` helper function in
|
||||
`firefox/redirects.py <https://github.com/mozilla/bedrock/blob/main/bedrock/firefox/redirects.py>`_.
|
||||
|
|
Загрузка…
Ссылка в новой задаче