Nanigans Destination

Segment makes it easy to send your data to Nanigans (and lots of other destinations). Once you've tracked your data through our open source libraries we'll translate and route your data to Nanigans in the format they understand. Learn more about how to use Nanigans with Segment.

Getting Started

When you toggle on Nanigans in Segment, this is what happens:

  • Our CDN is updated within 5-10 minutes. Then our snippet will start asynchronously loading Nanigans.js onto your page. This means you should remove Nanigans’s snippet from your page.
  • Nanigans will start automatically collecting data on your site.

Track

In order for the track call to succeed, the requirements include a userId being set previously by an identify call.

For ecommerce events,(i.e. purchase) it is important that the .track() call also includes the below within properties:

  • orderId
  • products array, which contain objects that have sku, quantity, and price

More information about the semantic naming of our ecommerce events.

If the folks at Nanigans ask you pass through any custom parameters, you can map the Segment event properties to arbitrary querystring parameters as well. Note: This is currently only supported via the server-side destination, which is used for our mobile and server-side libraries.

Server-Side

By default, if you are sending data via a mobile library, we will send the IDFA (iOS) or Advertising ID (Android) so that you can associate server side events with the anonymous users from your mobile app.

However, if you are sending events with a server side library, you can still manually pass the IDFA or Advertising ID under context.device.advertisingId and we will send it along to achieve the same effect.

Mobile

By default, if you send any data with either the iOS or Android library, we will send that data to Nanigans required /mobile.php endpoint.

If you’d like to send any other server side event using a server side library, you can either enable the option “Send Events to Mobile Endpoint” in your Nanigans settings. However, this means that ALL server side events sent from your server side library will be sent to the mobile endpoint.

If you are unsure which endpoint to send to, please contact Nanigans support!


Supported Sources and Connection Modes

WebMobileServer
📱 Device-based
☁️ Cloud-based

To learn more about about Connection Modes and what dictates which we support, see here.

Settings

Segment lets you change these destination settings via your Segment dashboard without having to touch any code.

App ID

You can find your App ID in your Nanigans pixel; it’s the xxx part of the app_id=xxx parameter.

Conversion events

Use these fields to map your Segment event names to Nanigans event names. We’ll only send Nanigans the conversion events you specify.

Facebook App ID

You can find your Facebook App ID in your Nanigans pixel; it’s the xxx part of the fb_app_id=xxx parameter.

Send Events to Mobile Endpoint

Select this option to send your data to Nanigans’ mobile endpoint. Most projects (even mobile ones) don’t need this option enabled; if you’re unsure, check with your Nanigans contact. Note that if you set this option, you must also set your Facebook App ID.


If you have any questions or see anywhere we can improve our documentation, please let us know or kick off a conversation in the Segment Community!