# Integrations and source troubleshooting

Sending data through Segment, mobile attribution after iOS 14, and instrumenting on third-party site builders like Wix or Squarespace.

Source: https://amplitude.com/docs/data/troubleshooting/integrations-and-sources

---

On this page

- [Segment-Amplitude integration](#segment-amplitude-integration)
- [Missing events](#missing-events)
- [Why am I not seeing any data in Amplitude?](#why-am-i-not-seeing-any-data-in-amplitude)
- [Are you over the event-type instrumentation limit?](#are-you-over-the-event-type-instrumentation-limit)
- [Is the event Deleted/blocked from Amplitude?](#is-the-event-deletedblocked-from-amplitude)
- [Are there any Errors in Segment's debugger?](#are-there-any-errors-in-segments-debugger)
- [Does the event exist in Segment?](#does-the-event-exist-in-segment)
- [Missing properties](#missing-properties)
- [What is the difference between an event property and a user property?](#what-is-the-difference-between-an-event-property-and-a-user-property)
- [Why do I not see any user properties or only \[Amplitude\] user properties?](#why-do-i-not-see-any-user-properties-or-only-amplitude-user-properties)
- [Are you over the event property type instrumentation limit?](#are-you-over-the-event-property-type-instrumentation-limit)
- [Is the property deleted/blocked from Amplitude?](#is-the-property-deletedblocked-from-amplitude)
- [Did the property come through in the raw payload to Segment?](#did-the-property-come-through-in-the-raw-payload-to-segment)
- [Does the property exist in Segment's schema?](#does-the-property-exist-in-segments-schema)
- [Spot any syntax code errors/other instrumentation errors?](#spot-any-syntax-code-errorsother-instrumentation-errors)
- [Why is the location information (city and/or country) from Segment's data different from the location information in Amplitude's data?](#why-is-the-location-information-city-andor-country-from-segments-data-different-from-the-location-information-in-amplitudes-data)
- [Incorrectly-tracked sessions](#incorrectly-tracked-sessions)
- [What is the definition of a session?](#what-is-the-definition-of-a-session)
- [Why do all of my events have a sessionId of -1?](#why-do-all-of-my-events-have-a-sessionid-of--1)
- [Why are there no session length calculations in Amplitude Dashboard?](#why-are-there-no-session-length-calculations-in-amplitude-dashboard)
- [What if their SDK doesn’t support feature X? \[device-mode\]](#what-if-their-sdk-doesnt-support-feature-x-device-mode)
- [Still have questions?](#still-have-questions)
- [iOS 14 changes](#ios-14-changes)
- [Does Amplitude accept IDFA (Identifier for Advertisers) as the device identifier on iOS?](#does-amplitude-accept-idfa-identifier-for-advertisers-as-the-device-identifier-on-ios)
- [What are the implications of Apple’s IDFA changes on user tracking?](#what-are-the-implications-of-apples-idfa-changes-on-user-tracking)
- [Does Amplitude require IDFA on attribution events?](#does-amplitude-require-idfa-on-attribution-events)
- [How will this affect outbound integrations?](#how-will-this-affect-outbound-integrations)
- [Missing mobile attribution events](#missing-mobile-attribution-events)
- [Why mobile attribution events may be missing](#why-mobile-attribution-events-may-be-missing)
- [Troubleshoot: No existing user in Amplitude with the matching IDFA, IDFV, or ADID](#troubleshoot-no-existing-user-in-amplitude-with-the-matching-idfa-idfv-or-adid)
- [Determine if you are tracking advertising IDs](#determine-if-you-are-tracking-advertising-ids)
- [Solution: Tracking advertising IDs](#solution-tracking-advertising-ids)
- [Troubleshoot: Mapping was not made within 72 hours](#troubleshoot-mapping-was-not-made-within-72-hours)
- [Determine if the attribution event came too early](#determine-if-the-attribution-event-came-too-early)
- [Solution: Create users before real user activity](#solution-create-users-before-real-user-activity)
- [Instrument on third-party site builders](#instrument-on-third-party-site-builders)
- [How do I instrument Amplitude on a third-party website builder?](#how-do-i-instrument-amplitude-on-a-third-party-website-builder)
- [How do I instrument Amplitude on Wix?](#how-do-i-instrument-amplitude-on-wix)
- [How do I instrument Amplitude on Squarespace?](#how-do-i-instrument-amplitude-on-squarespace)

# Integrations and source troubleshooting

These sections cover problems specific to data sources and integrations — Segment, mobile attribution, and third-party site builders.

## Segment-Amplitude integration

## Missing events

### Why am I not seeing any data in Amplitude?

Before you consider an event missing from Amplitude, remember that if the event is not in Segment then it will not be in Amplitude. Also, make sure that your requests from Segment received a successful response before considering an event missing.

Once you make sure that the event is in Segment and got a successful response, here are the first 3 things you should confirm:

1. Has Amplitude been enabled as a destination?

2. Has the correct API Key been inputted?

   Double-check the Amplitude API Key value in project settings in your Amplitude UI to make sure the correct one is used in Segment.

3. Is the syntax correct?

   Sometimes it is not obvious that there are instrumentation errors, so always double-check the code for syntax errors (Browser’s ‘Console’ tab can be helpful):

   After going through the above steps and confirming those requirements are correct, send data to Amplitude by calling `track`. Data will be visible after you track your first event.

### Are you over the event-type instrumentation limit?

If you went [over the limit](/docs/faq/limits-and-quotas), any data sent after that will not be ingested. If you want to ingest more event types you have to delete events to get back under the limit.

### Is the event Deleted/blocked from Amplitude?

Check your deleted/blocked events. Deleting event types also blocks all future instances of events with the same name. If you send any data to a deleted or blocked event name in Amplitude it won't come through.

### Are there any Errors in Segment's debugger?

Check your Debugger tab to see if there are any errors. If there are no instances of the missing event in the Debugger, try to send a test event of that event type. If the event never comes through to Segment in the first place, then it won't show up in Amplitude.

### Does the event exist in Segment?

For track calls, you can choose to only send *certain* events to *certain* integrations. So double-check if the event is sending and that Amplitude is enabled.

You can also enable/disable specific integrations directly in the instrumentation code, so check that Amplitude isn't disabled in the actual code.

For page/screen calls, there's no way to see all the individual names of the pages but you can see from the activity if page calls are being received by Segment.

You can also check the raw JSON of the requests to verify if the Amplitude integration has been turned off:

json

```
"integrations": {
    "Amplitude": false
}

## Missing properties

### What is the difference between an event property and a user property?

[This article](/docs/data/user-properties-and-events) explains the difference between the two types of properties.

### Why do I not see any user properties or only \[Amplitude] user properties?

In order to send user properties via [Segment](https://segment.com/), you would have to call `identify` and include your user properties in the `traits` field. You can read more about an `identify` call in the [Segment documentation](https://segment.com/docs/spec/identify/).

### Are you over the event property type instrumentation limit?

If you went [over the limit](/docs/faq/limits-and-quotas), then that may be why you are missing properties in Amplitude. Any data sent after you are over the limit will not be ingested. You will need to delete the properties to get back under the limit to ingest new properties.

### Is the property deleted/blocked from Amplitude?

Check your deleted/blocked properties. Deleting properties also blocks all future instances of properties with the same name. If you attempt to send any data to Amplitude with the deleted or block property name, it won't come through.

### Did the property come through in the raw payload to Segment?

If you don't see it in Segment, you won't see it in Amplitude. Check your Segment's debugger to make sure that the property appeared in Segment first.

### Does the property exist in Segment's schema?

Check your tracked properties and make sure they exist in Segment.

### Spot any syntax code errors/other instrumentation errors?

Sometimes it is not obvious that there are instrumentation errors, so always double-check the code for syntax errors (Browser’s ‘Console’ tab can be helpful).

See Segment's specs [here](https://segment.com/docs/spec/) on the best way to format your data.

Amplitude also has a [limit of 1024 characters](/docs/faq/limits-and-quotas), so if the property value is too long, this might be the reason why it is not showing up in Amplitude.

### Why is the location information (city and/or country) from Segment's data different from the location information in Amplitude's data?

Amplitude attempts to determine the user's location from their IP address, if available. This may be different from the location information recorded by Segment.

## Incorrectly-tracked sessions

### What is the definition of a session?

A session is defined as a period of time that the user has the application open in the foreground. If session tracking is available, events logged within the same session will have the same session ID. A new session is started if the application enters the foreground after being in the background or closed for more than five minutes.

### Why do all of my events have a `sessionId` of -1?

If you are using the Amplitude Classic integration in Cloud mode, Segment does not provide session tracking by default, so you will see Session ID = -1 in Amplitude. Segment doesn’t have a [concept for a session](https://segment.com/blog/facts-vs-stories-why-segment-has-no-sessions-api/). You will have to pass in the sessionId for your server-side calls from Segment to Amplitude see details [here.](https://segment.com/docs/integrations/amplitude/#sessionid%C2%A0)

If you use Segment's client-side bundled integration it will use Amplitude's native SDKs. They will track Session IDs for you here are the options from Segment:

- Use the integration in device mode and utilize Amplitude's native SDKs' default session-tracking details [here.](/docs/data/source-catalog/segment)
- If you use the Amplitude Actions integration from Segment there is session tracking is available in Segment's new libraries [Analytics.js 2.0](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/), [Swift](https://github.com/segmentio/analytics-swift) or [Kotlin](https://github.com/segmentio/analytics-kotlin) details [here](https://segment.com/docs/connections/destinations/catalog/actions-amplitude/#connection-modes-for-amplitude-actions-destination).

### Why are there no session length calculations in Amplitude Dashboard?

See the previous answer.

### What if their SDK doesn’t support feature X? \[device-mode]

Segment SDK might not have all the APIs provided by the Amplitude SDK; however, you can still access features by directly calling Amplitude's SDKs.

### Still have questions?

Submit a Support ticket with the following details:

- What type of connection are you using? ([cloud-mode or device-mode](https://segment.com/docs/connections/destinations/#connection-modes))
- Do you have any destination filters enabled?
- Do you see any errors in the *Event Delivery* tab?
- Confirm that the correct API Key has been used for the Amplitude destination.

Lastly, share the raw data for an event that should've been in Amplitude, but is missing. We need a full payload of the event, including the endpoint used, header, body, etc.

## iOS 14 changes

At WWDC 2020, Apple announced that iOS 14 will require users to opt in to tracking. This means that the IDFA will only be present for users who explicitly opt-in. It's likely that the percentage of users who choose to do so will be relatively low.

This article covers some frequently asked questions about Apple's iOS 14 IDFA changes.

### Does Amplitude accept IDFA (Identifier for Advertisers) as the device identifier on iOS?

By default, Amplitude’s iOS SDK uses IDFV (Identifier for Vendor) for the device ID. You can always change this and opt to use whatever you want as the device identifier. The SDK includes an option to use IDFA as the device ID, but this will only work if the user has permitted the application to use IDFA.

### What are the implications of Apple’s IDFA changes on user tracking?

For all logged-in users, there will be no impact. Even if the device ID changes, events will continue to merge from devices when Amplitude receives a common user ID. There is some potential for impacts on anonymous users, however.

For anonymous users, there will be no changes in most cases, because the vast majority of Amplitude customers do not set IDFA as the device ID. For customers who are doing this, the device ID was stored when the SDK was originally initialized, and it will continue to send Amplitude the same ID as long as the application remains installed on the device.

If a user deletes and reinstalls an application that does use IDFA for device ID, the former device ID will not be retained. Instead, a new random device ID will be generated, unless the user grants the application permission to use IDFA.

For all new application installs, the SDK will accept IDFA if both the user has opted in and the application chooses to use IDFA.

### Does Amplitude require IDFA on attribution events?

No. Amplitude’s attribution API will accept both IDFA and IDFV, and will attempt to match those IDs to user events it receives subsequently. In some cases, IDFV will be enough to make a match, but some of our customers’ attribution providers only send IDFA. For these customers, Amplitude will no longer be able to match attribution events, unless the user has **explicitly opted-in** to both the referring and installed application.

It's likely that some attribution vendors will stop sending any individual attribution events. However, it's unlikely that aggregated data will be sent to Amplitude (due to the nature of the platform itself), unless customers or attribution vendors can segment that data and use it to set user properties.

### How will this affect outbound integrations?

If you're sending data to outbound integrations, there will be a lower match rate if you use IDFA to match devices between Amplitude and the integration. We recommend that you switch to IDFV or another common identifier instead.

## Missing mobile attribution events

Mobile attribution partners identify events using advertising IDs like IDFA / IDFV / ADID. However, Amplitude identifies users based on a combination of `user_id`, `device_id`, and `amplitude_id`.

Amplitude's [Attribution API](/docs/apis/analytics/attribution) omits these differences and maps attribution events to existing users in Amplitude. Some mobile attribution partners–like, Appsflyer, Adjust, Branch, and Singular–use this API to send their non-custom, standard data with the advertising IDs as the identifier.

Amplitude stores unmapped attribution events for 72 hours. During that time, Amplitude will look for a matching IDFA, IDFV, or ADID on an already-existing user in an Amplitude project. If there is one, Amplitude will route that attribution event to that user. If there isn't, Amplitude will drop the attribution event once those 72 hours have passed.

To facilitate this process, be sure to instrument Amplitude with advertising IDs enabled.

## Why mobile attribution events may be missing

In some cases, the issue is easily and quickly resolvable:

- The attribution events were not successfully sent to Amplitude. Make sure the attribution partner is receiving a success response (i.e., a 200) when sending events.
- Your project has reached the [instrumentation limit](/docs/faq/limits-and-quotas). You may need to delete event types or properties in order to allow Amplitude Analytics to ingest new event types and properties.
- The event type has been blocked or deleted in the Amplitude project. Restore the event type or property via Amplitude Data to fix the issue.

However, there are other commonly-encountered reasons that can take a little more investigating to resolve:

- There is no existing user in Amplitude with the matching IDFA, IDFV, or ADID
- Mapping was not completed within 72 hours

## Troubleshoot: No existing user in Amplitude with the matching IDFA, IDFV, or ADID

This is the top reason why mobile attribution events are not ingested by Amplitude Analytics. Remember, you do have to instrument Amplitude **before** you can send over mobile attribution events.

### Determine if you are tracking advertising IDs

Advertising IDs are IDFA, IDFV, or ADID. If you are tracking them in your Amplitude events, Amplitude Analytics will capture their value in the respective property field. However, for security and PII reasons, they **will not appear** as a useable property, and will be removed from your raw data after they have been captured (unless you instrument this as a custom property).

Amplitude does store a hashed version of the advertising IDs, in a field called `amplitude_attribution_ids`. Use this field to determine whether or not you are instrumenting advertising IDs. If the value of this field is `null`, then no advertising IDs were captured for this user.

Generally, this means either that you have not instrumented Amplitude Analytics to capture advertising IDs, or that the end user has opted out of advertising ID tracking.

User opt-outs **must be honored**. If you know advertising IDs are tracked properly and want to confirm `amplitude_attribution_ids = null` because of user opt-out, contact Amplitude Support.

### Solution: Tracking advertising IDs

If you are using the Javascript—which lack the ability to track advertising IDs automatically—you will have to send an Amplitude event with the advertising ID via the [HTTP API](/docs/data/sources/instrument-track-unique-users).

## Troubleshoot: Mapping was not made within 72 hours

Amplitude will hold an attribution event for 72 hours. If a match is not made during that time, the event will be dropped.

For example, User A downloads a game app on December 1 but does not open the app until December 7:

- Mobile attribution partners would list an Install event for User A on December 1 and send that event to Amplitude on December 1.
- User A does not record their first event in Amplitude until they open the app on December 7. User A is considered a new user on December 7 in Amplitude.

User A's `Install` event will be dropped because User A did not exist in Amplitude within 72 hours of the attribution event. User A only existed in Amplitude seven days after the `Install` event, which is longer than the 72-hour holding period.

### Determine if the attribution event came too early

Amplitude's iOS SDKs captures IDFV as `device_id` by default. If you use the default setting for iOS SDKs, you can use an iOS example to troubleshoot this:

1. Identify an iOS SDK user in Amplitude who does not have an `Install` event, even though there is a value for `amplitude_attribution_ids`.
2. Copy the `device_id` (aka IDFV) of that user.
3. With your mobile attribution provider, look for the `Install` event of the IDFV.
4. Check the date on the `Install` event.
5. Compare that date to the New User date in Amplitude.

You will likely see that the date of the `Install` event was sent more than 72 hours before the user existed in Amplitude.

You can also see whether a user already exists in Amplitude by following a similar process:

1. Identify an iOS Install event from the mobile attribution provider who does not appear in Amplitude yet.
2. Grab the IDFV on that payload.
3. Enter the IDFV in the [user look-up](/docs/analytics/user-data-lookup) feature as the device ID.

You will likely see that the IDFV is not associated to a profile in Amplitude Analytics, which means Amplitude has not seen the user yet.

### Solution: Create users before real user activity

An end user exists in Amplitude when their first event is received by Amplitude. If you do not want to wait on your end user's actions to trigger a profile creation, you can create a profile for them yourself, by either:

- Sending a dummy event with advertising ID and `device_id` or `user_id` through the HTTP API
- Creating a profile with advertising ID and `device_id` or `user_id` through the Identity API

This is only possible if you can capture the advertising ID on your own. Make sure you maintain the right `device_id` or `user_id`, so that real-world user activity is connected to the right profile.

## Instrument on third-party site builders

These instructions may become outdated as the third-party platforms under discussion here make changes and upgrades. Amplitude's Support team provides support for the instructions and processes contained in this article only; they can't provide recommendations for anything not included here.

### How do I instrument Amplitude on a third-party website builder?

Your website may not be natively built, but is instead built on a third-party website builder like Wix or Squarespace. Like a website built natively, most third-party website builders have an underlying code base you can use. Add Amplitude's [Javascript SDK](/docs/sdks/analytics/browser/javascript-sdk) to that space, as if you were adding the SDK to your natively built website. Add the [JavaScript SDK snippet](/docs/sdks/analytics/browser/javascript-sdk#install) to the header and the rest of the JavaScript SDK code in the body.

If you don't have access to the header or underlying source code for the third-party's website, you should still be able to use [webhooks](https://en.wikipedia.org/wiki/Webhook) to combine a [trigger](https://support.zendesk.com/hc/en-us/articles/203662106) or [automation](https://support.zendesk.com/hc/en-us/articles/203662126) with an HTTP [target](https://support.zendesk.com/hc/en-us/articles/203662136) to Amplitude's server-side endpoint - [HTTP v2](/docs/apis/analytics/http-v2).

### How do I instrument Amplitude on Wix?

Wix has a Tracking Tools & Analytics feature, which you can use to embed Amplitude’s JavaScript SDK snippet and code to your site.

To do so, follow these steps:

1. Go to [*Settings* in your site's dashboard](https://www.wix.com/my-account/site-selector/?buttonText=Manage%20Settings\&title=Select%20a%20Site\&autoSelectOnSingleSite=true\&actionUrl=https://www.wix.com/dashboard/%7B%7BmetaSiteId%7D%7D/manage-website).

2. Click the *Tracking & Analytics* tab, under *Advanced Settings*.

3. Click *+ New Tool* and select *Custom*.

4. Set up your custom code:

   1. Enter your custom code.

   2. Select the relevant domain. This option appears only if you have multiple domains.

   3. Enter a name for your custom code.

   4. Add Code to Pages: Select which pages to add your code to:

      - All Pages: Click the dropdown and select either *Load code once*, or [*Load code on each new page*](https://support.wix.com/en/article/custom-code-loading-options).
      - Choose specific pages: Begin typing the name of the relevant pages. Then click the checkbox next to the relevant page.

   5. Place Code in: Select where the code snippet in placed in your site's code.

      - Head: this is where the [JS SDK install snippet](/docs/sdks/analytics/browser/javascript-sdk#install) should be on every page you wish to track analytics.
      - Body: this is where all other calls [logEvent](https://www.docs.developers.amplitude.com/data/sdks/typescript-browser/migration/?h=logevent#tracking-events), [user properties](/docs/sdks/analytics/browser/migrate-from-javascript-sdk-to-browser-sdk-1-0#set-user-properties) should go.

5. Click *Apply*.

Some customers have told have said that Wix allows you to add header scripts, but not to call functions from them. One suggested workaround is putting the necessary script in the Public folder.

**Further reading on Wix**

- [Adding custom code to your site](https://support.wix.com/en/article/about-tracking-tools-analytics)
- [Embedding custom code on your site](https://support.wix.com/en/article/embedding-custom-code-to-your-site)

### How do I instrument Amplitude on Squarespace?

Squarespace's Code Injection and Code Block features let you embed Amplitude’s JS SDK snippet and code to your site.

These features may be premium features, only available in Business and Commerce plans.

**Code Injection**

Use Code Injection to add Amplitude’s JavaScript SDK install snippet and other scripts that enhance specific parts of your site, like an order confirmation page.

To add JavaScript to a Code Injection field, surround the code with \<script>\</script> tags. There are site-wide code injection and per-page code injection options. See [this page](https://support.squarespace.com/hc/en-us/articles/205815908) for a per-page code injection option. If you add code to Code Injection, Squarespace may ask you to [disable it while editing your site](https://support.squarespace.com/hc/articles/205815908#toc-disable-scripts-in-preview).

Next, add the JavaScript SDK install snippet with Code Injection by following these steps:

1. Open Code Injection. In the *Home* menu, navigate to *Settings* *> Advanced >* *Code Injection*.

2. Add JavaScript SDK code into the appropriate Code Injection fields for the header, footer, lock page, or order confirmation page.

   - Header: Code added here is injected into the \<head> tag on every page in your site. This is where the Amplitude JavaScript SDK install snippet is.\*\*
   - Learn more about your other three options [here](https://support.squarespace.com/hc/en-us/articles/205815908).

3. After adding your code, click *Save*.

**Code Block**

Use Code Block to set up logEvent, user properties etc calls. To add JavaScript to a Code Block field, surround the code with \<script>\</script> tags.

To add a Code Block, follow these steps:

1. Edit a page or post, click an insert point, and select *Code* from the menu. For help, visit [Adding content with blocks](https://support.squarespace.com/hc/articles/206543757).
2. [Add your code](https://support.squarespace.com/hc/en-us/articles/206543167#toc-add-code) in the text field: see our [Using the SDKs](/docs/sdks/analytics/browser/browser-sdk-2#track-an-event) documentation for the event and properties calls.
3. If you're using the Code Block to [display code snippets](https://support.squarespace.com/hc/en-us/articles/206543167#toc-display-source), check *Display Source*.
4. Click *Apply* to save your changes.

Was this helpful?

<!--$-->

<!--/$-->
