Adobe SDK Mobile flutter send event | Community
Skip to main content
New Participant
Sep 12, 2024 9:13 AM UTC
Question

Adobe SDK Mobile flutter send event

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

New Participant
Oct 22, 2024 1:30 PM UTC

Thank you for your help @john_man.

 

I have indeed succeeded on my side in bringing up the information. It is indeed similar to react native.
You have to create your Schema and put it back into the code, respecting the formatting.
Here's an example of my schema (don't hesitate to download the json version to be sure of respecting the format) and the code I put in the application:

Thanks,

Florence

Translate
John_Man
Level 2
Sep 12, 2024 11:52 AM UTC

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.

 

Translate