Adobe Target Store and Fetch Profile script WebSdk

adobe target store profile script

Hi in this article we will learn how we can store and fetch the profile script in Adobe target webSdk, As in webSdk we use alloy send event method to push the data on the edge server and to fetch the data from the edge server , in websdk version all the adobe target data and analytics data store in edge server only and to sync between edge server and adobet target to analytics we use the dataStreams

A datastream represents the server-side configuration when implementing the Adobe Experience Platform Web and Mobile SDKs. While the configure command in the SDK controls things that must be handled on the client (such as the edgeDomain), datastreams handle all other configurations for the SDK. 
For more details you can check the below url
https://experienceleague.adobe.com/en/docs/experience-platform/datastreams/overview

So through alloy.sendEvent method we can send dta to edge server as profile script and if we need to call the profile script on our code we can directly write ${profile.objectName} adn able to call the value of stored profile script.

Now lets see the method to store the data in profile script, please check the below code

In above code we are are storing “profile.valueOne”: ‘true’ , “profile.valueOne”: ‘true’ as adobe target profile attributes and the we are sending alloy.sendevent call in which we are passing the data and decisionScopes as view so once the call will sucessfull the it will store the profile attributes in edge server and we can recall the any time

Below is the method to recall them, While you are creating any target activity A/B Testing , XT activity you acna call the profile paremeters withing the activity by using below code

Further reading

  • React UseEffect | simplifyScript

    Understanding the useEffect hook in React

    In this article, we will learn about another React hook called useEffect(), through this article you will be able to understand what is react useEffect Hook and how to use useEffect() hook in react, this is most communally used hook after useState() hook, we mostly use this hook in every component on react now first […]
  • React useState function

    How to Use useState Hook in React Application

     In a React application, normal vanilla JavaScript may not work for some concepts. For example, if I want to toggle a class on a button click or add and remove classes, I might need to show a popup on the website. This can be easily achieved in vanilla JavaScript using the element.classList.toggle(“newClass”) method, allowing us to add […]
  • javascript DOm manipulation - simplifyscript

    What is DOM manipulation in javascript 

    In this article, we will explore JavaScript DOM manipulation, a key feature of JavaScript that allows developers to modify the Document Object Model (DOM) of a webpage. DOM manipulation enables you to dynamically alter the content and structure of HTML documents. To grasp this concept thoroughly, we’ll start by defining what the DOM is and […]