Purchasely can send all your transactional events to Amplitude to enrich your users data.
The following events will be sent. You can set the event name of your choice in the console.
Associate users and devices to events
let amplitudeUserId = Amplitude.instance().getUserId()
Purchasely.setAttribute(.amplitudeUserId, value: String(amplitudeUserId))
let amplitudeDeviceId = Amplitude.instance().getDeviceId()
Purchasely.setAttribute(.amplitudeDeviceId, value: String(amplitudeDeviceId))
Purchasely.setAttribute(
Attribute.AMPLITUDE_USER_ID,
Amplitude.getInstance().userId.toString()
)
Purchasely.setAttribute(
Attribute.AMPLITUDE_DEVICE_ID,
Amplitude.getInstance().deviceId.toString()
)
Purchasely.setAttribute(
Attribute.AMPLITUDE_USER_ID,
String.valueOf(Amplitude.getInstance().getUserId())
);
Purchasely.setAttribute(
Attribute.AMPLITUDE_DEVICE_ID,
String.valueOf(Amplitude.getInstance().getDeviceId())
);
Purchasely.setAttribute(Attributes.AMPLITUDE_USER_ID, Amplitude.getInstance().getUserId());
Purchasely.setAttribute(Attributes.AMPLITUDE_DEVICE_ID, Amplitude.getInstance().getDeviceId());
Purchasely.setAttribute(Purchasely.Attribute.AMPLITUDE_USER_ID, Amplitude.getInstance().getUserId());
Purchasely.setAttribute(Purchasely.Attribute.AMPLITUDE_DEVICE_ID, Amplitude.getInstance().getDeviceId());