|
| 1 | +================================================== |
| 2 | +Lucky Orange -- All-in-one conversion optimization |
| 3 | +================================================== |
| 4 | + |
| 5 | +`Lucky Orange`_ is a website analytics and user feedback tool. |
| 6 | + |
| 7 | +.. _`Lucky Orange`: https://www.luckyorange.com/ |
| 8 | + |
| 9 | + |
| 10 | +.. luckyorange-installation: |
| 11 | +
|
| 12 | +Installation |
| 13 | +============ |
| 14 | + |
| 15 | +To start using the Lucky Orange integration, you must have installed the |
| 16 | +django-analytical package and have added the ``analytical`` application |
| 17 | +to :const:`INSTALLED_APPS` in your project :file:`settings.py` file. |
| 18 | +See :doc:`../install` for details. |
| 19 | + |
| 20 | +Next you need to add the Lucky Orange template tag to your templates. |
| 21 | +This step is only needed if you are not using the generic |
| 22 | +:ttag:`analytical.*` tags. If you are, skip to |
| 23 | +:ref:`luckyorange-configuration`. |
| 24 | + |
| 25 | +The Lucky Orange tracking code is inserted into templates using template |
| 26 | +tags. Because every page that you want to track must have the tag, it |
| 27 | +is useful to add it to your base template. At the top of the template, |
| 28 | +load the :mod:`luckyorange` template tag library. Then insert the |
| 29 | +:ttag:`luckyorange` tag at the bottom of the head section:: |
| 30 | + |
| 31 | + {% load luckyorange %} |
| 32 | + <html> |
| 33 | + <head> |
| 34 | + ... |
| 35 | + {% luckyorange %} |
| 36 | + </head> |
| 37 | + ... |
| 38 | + </html> |
| 39 | + |
| 40 | + |
| 41 | +.. _luckyorange-configuration: |
| 42 | + |
| 43 | +Configuration |
| 44 | +============= |
| 45 | + |
| 46 | +Before you can use the Lucky Orange integration, you must first set your |
| 47 | +Site ID. |
| 48 | + |
| 49 | + |
| 50 | +.. _luckyorange-id: |
| 51 | + |
| 52 | +Setting the Lucky Orange Site ID |
| 53 | +-------------------------------- |
| 54 | + |
| 55 | +You can find the Lucky Orange Site ID in the "Settings" of your Lucky |
| 56 | +Orange account, reachable via the gear icon on the top right corner. |
| 57 | +Set :const:`LUCKYORANGE_SITE_ID` in the project :file:`settings.py` file:: |
| 58 | + |
| 59 | + LUCKYORANGE_SITE_ID = 'XXXXXX' |
| 60 | + |
| 61 | +If you do not set a Lucky Orange Site ID, the code will not be rendered. |
| 62 | + |
| 63 | + |
| 64 | +.. _luckyorange-internal-ips: |
| 65 | + |
| 66 | +Internal IP addresses |
| 67 | +--------------------- |
| 68 | + |
| 69 | +Usually you do not want to track clicks from your development or |
| 70 | +internal IP addresses. By default, if the tags detect that the client |
| 71 | +comes from any address in the :const:`LUCKYORANGE_INTERNAL_IPS` |
| 72 | +setting, the tracking code is commented out. It takes the value of |
| 73 | +:const:`ANALYTICAL_INTERNAL_IPS` by default (which in turn is |
| 74 | +:const:`INTERNAL_IPS` by default). See :ref:`identifying-visitors` for |
| 75 | +important information about detecting the visitor IP address. |
0 commit comments