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

      AI is currently in its teenage years, battling raging hormones

      June 6, 2025

      4 ways your organization can adapt and thrive in the age of AI

      June 6, 2025

      Google’s new Search tool turns financial info into interactive charts – how to try it

      June 6, 2025

      This rugged Android phone has something I’ve never seen on competing models

      June 6, 2025

      Anthropic’s new AI models for classified info are already in use by US gov

      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

      Handling PostgreSQL Migrations in Node.js

      June 6, 2025
      Recent

      Handling PostgreSQL Migrations in Node.js

      June 6, 2025

      How to Add Product Badges in Optimizely Configured Commerce Spire

      June 6, 2025

      Salesforce Health Check Assessment Unlocks ROI

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

      Microsoft: Run PS script now if you deleted “inetpub” on Windows 11, Windows 10

      June 6, 2025
      Recent

      Microsoft: Run PS script now if you deleted “inetpub” on Windows 11, Windows 10

      June 6, 2025

      Spf Permerror Troubleshooting Guide For Better Email Deliverability Today

      June 6, 2025

      Amap – Gather Info in Easy Way

      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 7, 2025
    Security

    Apple’s App Store shaken: Court ends ‘Apple tax’ on external purchases

    June 7, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    CVE-2025-47675 – Woobox Cross-Site Scripting (XSS)

    Common Vulnerabilities and Exposures (CVEs)

    Bill Gates says, “We weren’t born to do jobs. AI will replace humans for most things.”

    News & Updates

    The 2025 Work Trend Index Annual Report: The Year the Frontier Firm Is Born

    Development

    CVE-2025-48885 – XWiki URL Shortener Unauthenticated Page Creation Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    CVE-2025-25228 – VirtueMart SQL Injection Vulnerability

    April 21, 2025

    CVE ID : CVE-2025-25228

    Published : April 21, 2025, 8:15 a.m. | 2 hours, 41 minutes ago

    Description : A SQL injection in VirtueMart component 1.0.0 – 4.4.7 for Joomla allows authenticated attackers (administrator) to execute arbitrary SQL commands in the product management area in backend.

    Severity: 0.0 | NA

    Visit the link for more details, such as CVSS details, affected products, timeline, and more…

    Alpine Linux Cerca Supporto per l’Hosting: Una Sfida Critica per il Futuro del Progetto

    February 5, 2025

    A faster way to solve complex planning problems

    April 16, 2025

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

    April 5, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

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