Bitrix Site Manager

Adding events

In this topic

  • Loading from file
  • Event table
  • Automated registration of events
  • This form allows you to add events occurred outside the scope of your site. Examples of such events are order payments, order cancellation, etc.

    Loading from file

    The page also offers facilities to upload a CSV file containing a list of events. The uploaded file should have the following format:

    "[1]","[2]","[3]","[4]","[5]","[6]","[7]", where:

    1. ID of the event type
    2. Auxiliary parameter "event3"
    3. Date. The date should be specified in the date format of the current language.
    4. Additional parameter in the following format:
      [site code].[session ID].[visitor ID].[country ID].[advertising 
       campaign ID].[Y-return within advertising campaign; N-direct visit]. 
      The site code is defined in the settings of the Statistics module.
    5. Amount of money
    6. Three-character currency abbreviation (e.g. USD, RUR, EUR, etc.). The currency must have been defined in the Currency module. Otherwise, the value will not be converted to the base currency and the value will be assigned as is.
    7. Refund flag. If set to Y, then the value is kept back from the advertising campaign revenue. If set to N, then the value is added to the advertising campaign revenue.

    Please follow the below guidelines when creating a CSV file.

    Standard CSV file example

    16,"file1.exe","10.12.2002 12:30","BITRIX_SM.10.5.RU.6.Y","250","USD"
    16,"help_doc.chm","10.12.2002 12:30"
    16,"Bitrix: ""Site Manager""","BITRIX_SM.11.4.US.8.N","233.45","RUR","Y"

    Click the Load button to load the file in the form. The form is described below.

    Manual entry

    Another way to add events is to enter them manually.

    #Event type ID Event3 Date Additional parameter 
    Amount Currency Chargeback
    [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]
    1. Event number.
    2. Event type ID.
    3. Click this icon to select the type of event in a separate window.
    4. Auxiliary parameter event3 (for example, it may contain the order amount). 
    5. Date of the event. 
    6. Click this icon to display a calendar. 
    7. Additional parameter. 
    8. Sum of money under the event. 
    9. Currency (this column is only displayed if the base currency had been specified in the module settings. The base currency can be set if only the Currency module is installed.)
    10. If checked, the Amount is subtracted from the advertising campaign profit. Otherwise, the advertising campaign profit becomes increased by the value of Amount
    11. Click this icon to duplicate the current line.

    Automated registration of events

    When a visitor leaves the site, for example, for making an order, the link to the external pay system should contain a special template #EVENT_GID#. Later, the script file redirect.php automatically substitutes this template with the compound identifier:

    [site code].[session ID].[visitor ID].[country ID].[advertising 
     campaign ID].[Y-return within advertising campaign; N-direct visit].

    The below is an example of such a link:

    <a href="

    The above link is provided in the readable form for simplicity. The original link in the canonic format looks as follows:

    <a href="

    The system HTML editor offers special features to insert such links.

    Most pay systems allow special parameters and return them in the order notification mail message. For example, the pay system accepts both referrer1 and referer2 parameters. As soon as you receive a message notifying you of the order, you should enroll this event in the statistics of your site.

    If you want the events to be enrolled automatically, you can do so by loading a PHP page. The full address of the page is constructed using the following formula.

    Address of your site.
    Login of a user with write access to the Statistics module.
    Password of the above described user.
    Abbreviation of the language used to format the event date (for example, en).
    [N], [N+1]
    Ordinal number of the event to add.
    Number of events to add.
    Type ID of the event to add.
    Auxiliary event parameter.
    Date of the event in the of the specified language ([language] field).

    Parameter in the following format:

    Amount of money under this event
    Refund flag. If set to "Y", then the value is kept back from the advertising campaign revenue. If set to "N", then the value is added to the advertising campaign revenue. The default value is "N".
    Set this flag to Y to check the uniqueness of the added events. Otherwise, the uniqueness check is not performed.

    Sample address
           PARAM_2= BITRIX_SM.10400.700.RU.5.N&MONEY_2=970.35&check_unique=Y&save=Y

    The example above is given in human-readable form. For the page lo load correctly, you need to encode the url(for example, using the php function urlencode()).