Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      June 6, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 6, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 6, 2025

      In MCP era API discoverability is now more important than ever

      June 5, 2025

      Black Myth: Wukong is coming to Xbox exactly one year after launching on PlayStation

      June 6, 2025

      Reddit wants to sue Anthropic for stealing its data, but the Claude AI manufacturers vow to “defend ourselves vigorously”

      June 6, 2025

      Satya Nadella says Microsoft makes money every time you use ChatGPT: “Every day that ChatGPT succeeds is a fantastic day”

      June 6, 2025

      Multiple reports suggest a Persona 4 Remake from Atlus will be announced during the Xbox Games Showcase

      June 6, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      TC39 advances numerous proposals at latest meeting

      June 6, 2025
      Recent

      TC39 advances numerous proposals at latest meeting

      June 6, 2025

      TypeBridge – zero ceremony, compile time rpc for client and server com

      June 6, 2025

      Simplify Cloud-Native Development with Quarkus Extensions

      June 6, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Black Myth: Wukong is coming to Xbox exactly one year after launching on PlayStation

      June 6, 2025
      Recent

      Black Myth: Wukong is coming to Xbox exactly one year after launching on PlayStation

      June 6, 2025

      Reddit wants to sue Anthropic for stealing its data, but the Claude AI manufacturers vow to “defend ourselves vigorously”

      June 6, 2025

      Satya Nadella says Microsoft makes money every time you use ChatGPT: “Every day that ChatGPT succeeds is a fantastic day”

      June 6, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»Part 1 – Marketing Cloud Personalization and Mobile Apps: Functionality 101

    Part 1 – Marketing Cloud Personalization and Mobile Apps: Functionality 101

    April 21, 2025

    Over the past three years working with Marketing Cloud Personalization (formerly Interaction Studio), I’ve always been intrigued by the Mobile icon and its capabilities. A few months ago, I decided to take a hands-on approach by developing my own application to explore this functionality firsthand, testing its implementation and understanding its real-world impact. And that  is what this blog is about.

    The Overall Process

    The overall steps of the Marketing Cloud Personalization Mobile integration goes as follows:

    1. Have an Application 📲  (Understatement)
    2. Have access to the app project and code 💻.
    3. Integrate the Evergage SDK library to the app ☁.
    4. Create a Mobile App inside Personalization UI 🧑🏽‍💻
    5. Create a connection between the app and the Personalization Dataset 💻📲
    6. Track views and actions of the user in the app (code implementation) 📱➡ 💻.
    7. Publish and track campaign actions and push notifications 💻➡📱.

    That’s all… easy right?. Within this blog we will review how to do the connection between MCP and the mobile app and how to create a first interaction (steps 1 and part of step 6).

    For this demo, I developed an iOS application using the Swift programming language. While I’m not yet an expert, I’ve been steadily learning how to navigate Xcode and implement functionality using Swift. This project has been a great opportunity to expand my skills in iOS development and better understand the tools and frameworks available within Apple’s ecosystem.

    Integrate the Evergage SDK in the App

    The iOS app I create is very simple (for now), it just a label, a button and an input field. The user types something in the input field, then clicks the button and the data is sent to the label to be shown.

    Iphone 16 App Simulator View

    So, we need to add the Evergage SDK inside the app project. Download the Evergage iOS SDK (v1.4.1), unzip it and open the static folder. There, the Evergage.xcframework is the one we are about to use. When you have the folder ready, you need to copy the folder into your app. You should have something like this:

    Evergage Framework FolderMobileapp Folder Structure

    After you added your folder, you need to Build your app again with Command + B.

    Now we need to validate the framework is there, so go to Target -> General -> Frameworks, Libraries and Embedded Content. You should see something like this, and since I’m using the static folder, the Do Not Embed is ok.

    General Information In Xcode

    Validate the Framework Search Path contains a path where the framework was copied/installed. This step would probably be done manually since sometimes the path doesn’t appear. Build the app again to validate if no errors appears.

    Framework Search Paths

    To validate this works, go to the AppDelegate.swift and type Import Evergage, if no errors appear, you are good to go 🙂

    Import Evergage View

     

    Create a Mobile App Inside Personalization

    Next, we have to create the Native App inside the Personalization dataset of your choice.

    Hoover over Mobile and click Add Native App

    Mpc Mobile View

    Fill the information of the App Name and Bundle ID. For the Bundle ID, go to Target > General > Identity

    Add Native App

    You will with something like this:

    Demoapp Mpc View

    Create the Connection to the Dataset

    In the AppDelegate.swift , we will do the equivalent to add the JavaScript beacon on the page.

    1. First, we need to import the Evergage class reference. This allow the start of the Marketing Cloud Personalization iOS SDK. Our tracking interactions now should be done inside a UIViewController inherited classes.
    2. Change the didFinishLaunchingWithOptions to willFinishLaounchingWithOptions
    3. Inside the application function we do the following:
      1. Create a singleton instance of Evergage. A Singleton is a creational design pattern that lets you ensure that a class has only one instance, while providing a global access point to this instance. So with this, it provides a global access point to the instance, which can be used to coordinate actions across our app.
      2. Set the user id. For this, we set the evergage.userId using the evergage.anonymousId , but if we already have the email or an id for the user, we should passed right away.
      3. Start the Evergage configuration. Here we pass the Personalization’s account id and dataset id. Other values set are the usePushNotifications and the useDesignMode . The last one help us to connect the Personalization web console for action mapping screen.

     

    //Other imports
    Import Evergage
    
    @main
    class AppDelegate: UIResponder, UIApplicationDelegate {
    
    
    
        func application(_ application: UIApplication, willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool{
            
            //Create an singleton instance of Evergage
            let evergage = Evergage.sharedInstance()
            
            //Set User ID as anonymous
            evergage.userId = evergage.anonymousId
            
            //Start the Evergage Configuration with our Dataset information
            evergage.start { (clientConfigurationBuilder)   in
                clientConfigurationBuilder.account = "ACCOUNT_ID"
                clientConfigurationBuilder.dataset = "DATASET_ID"
                // if we want to user push notification campaings
                clientConfigurationBuilder.usePushNotifications = true
                //Allow user-initiated gesture to connect to the Personalization web console for action mapping screens.
                clientConfigurationBuilder.useDesignMode = true
            }
            
            
            
            // Override point for customization after application launch.
            return true
        }
    }

     

     

    If we launch the app at this very moment, we will get the following inside  Marketing Cloud personalization

    Eventstream Report Interaction Action Description

    This is very good and with that we are certain its working and sending the information to Marketing Cloud Personalization.

    Track Actions

    So, in order to track a screen we can use the evergageScreen . We use this property as part of the EVGScreen and EVGContext classes for tracking and personalization. This is possible when the app is using UIViewController for each of the screens or pages we have.

    class ViewController: UIViewController {
    
            override func viewDidLoad() {
                super.viewDidLoad()
                // Do any additional setup after loading the view.
                trackScreen()
            }
            
            func trackScreen(){
                
                evergageScreen?.trackAction("Main Screen")
                
            }
    }

     

    Interaction Action Forbutton

    If we would want to track the action of click a button, we can do something similar, for example this:

    @IBAction func handleClick(_ sender: UIButton) {
            
            labelText.text = inputField.text
            evergageScreen?.trackAction("Button clicked")
            
        }

    In this code, each time the user clicks a button, the handleClick function will trigger the action. the inputField.text will be assign to the labelText.text and the trackAction function will be triggered and the action will sent to our dataset.

    Wrapping Up Part 1: What’s next?

    That wraps up the first part of this tutorial! We’ve covered the basic about how to add the Personalization SDK inside a mobile iOS application, how to create a Mobile App  within Personalization and do a very basic action tracking in a view. In Part 2, we’ll dive into tracking more complex actions like view item and view item detail which are part of the catalog object action’s for tracking items.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleMicrosoft launches usage reporting for Microsoft Graph API
    Next Article Elevating Outcomes with AI: Highlights from Agentforce Denver 2025

    Related Posts

    Security

    Leadership, Trust, and Cyber Hygiene: NCSC’s Guide to Security Culture in Action

    June 6, 2025
    Security

    Critical Fortinet flaws now exploited in Qilin ransomware attacks

    June 6, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Svelte 5 And The Future Of Frameworks: A Chat With Rich Harris

    Tech & Work

    NVIDIA AI Introduces Audio-SDS: A Unified Diffusion-Based Framework for Prompt-Guided Audio Synthesis and Source Separation without Specialized Datasets

    Machine Learning

    CVE-2025-43920 – cPanel WHM Shell Command Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Are you watching A Minecraft Movie in theaters, and if so, what do you think of it? — Weekend discussion 💬

    News & Updates

    Highlights

    Inc 5000: MindK is one of the fastest-growing US companies

    August 14, 2024

    It’s been an honor to grow alongside our clients and their amazing products. In the…

    Lost and Found Portal Using PHP and MySQL

    August 10, 2024

    Lenovo just announced the shiniest laptop I’ve seen in a hot minute, and it’s also the first with an under-display camera

    January 7, 2025

    CVE-2025-40651 – Real Easy Store Reflected Cross-Site Scripting (XSS)

    May 28, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.