Expand my Community achievements bar.

Webinar: Adobe Customer Journey Analytics Product Innovations: A Quarterly Overview. Come learn for the Adobe Analytics Product team who will be covering AJO reporting, Graph-based Stitching, guided analysis for CJA, and more!

Adobe SDK Mobile flutter send event

Avatar

Level 1

Hello,
I'm making an Adobe SDK mobile implementation documentation with Flutter, and I don't understand how to do the “send event” part.
I'm thinking of using the flutter_aepedge plugin for sending events. On the Adobe Experience Platform Data Collection side, I've created the schema (available as an attachment) and the datastream.

I saw on the documentation (https://github.com/adobe/aepsdk_flutter/blob/main/plugins/flutter_aepedge/README.md) that I had to use this code:

Map<String, dynamic> xdmData = {“eventType”: “SampleEventType”};
Map<String, dynamic> data = {“free”: “form”, “data”: “example”};
final ExperienceEvent experienceEvent = ExperienceEvent({
  “xdmData": xdmData,
  “data": data
});
List<EventHandle> result = await Edge.sendEvent(experienceEvent);

 

But I don't know how to replace the elements.
I'd like someone to help me with just a first example, if I want to trigger a “screenView” event (value = 1) and with a “screenName” (value = “test page”) for example

 

Many thanks,

Florence

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply

Avatar

Level 5

Hi @Florence_Pauly 

 

We have not done anything on Flutter, but below is an exmaple for React Native, I think you just need to form the XDM object. There's also en eVar exmaple, assume you are using AA.

 

const demoXdmData = {

    "eventType": "web.webpagedetails.pageViews",

    "web": {

        "webPageDetails": {

            "name": "test page",

            "pageViews": { "value": 1 },

        },

    },

 

    "_experience": {

        "analytics": {

            "customDimensions": {

                "eVars": {

                    "eVar1": "page language", 

                    "eVar2": "something else",

                },

            },

        },

}

let experienceEvent = new ExperienceEvent({ xdmData: demoXdmData });

Edge.sendEvent(experienceEvent);

 

Hope this helps.