{module_visitoripaddress}

Description

The module {module_visitoripaddress} will display the IP address of the visitor, eg. 145.34.231.23

Syntax

{module_visitoripaddress collection="my_custom_collection_name" template=""}

Note: When using named parameters always wrap the individual parameters in double quotes. Also, do note that modules using named parameters do not work for campaigns just yet.

Parameters

This module can be rendered:

  • in plain text
  • using Liquid collections - this is the Liquid output tag you can use - my_custom_collection_name.ip

Examples

  • {module_visitoripaddress} - will display 145.34.231.23 in plain text
  • {module_visitoripaddress collection="collection1" template=""} - in this case nothing will be displayed, however the module's Liquid tags will become available in the collection1 collection
  • the site visitor's IP is also contained in a Liquid global object. {{globals.visitor}} will output:
    {
      "deviceClass": "desktop",
      "ip": "193.2.2.2",
      "country": "RO",
      "userAgent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.103 Safari/537.36"
    }

Syntax

{module_visitoripaddress}

Examples

  • {module_visitoripaddress} - will display 145.34.231.23 in plain text