sfmc.guide
Engagement Next
⌘K
Tools ssjs.guide
Function Index
  • AMPscript functions
  • AMPscript functions (Next)
  • Handlebars helpers
  • SSJS functions
Engagement
  • Overview
  • General guidelines
  • Differs from Official Docs
  • FAQ
  • Einstein Recommendations
    • Collect Code
    • Update Catalog
    • Predictive Intelligence (PI) Data Extensions
    • Einstein Email Recommendations
    • Einstein Web Recommendations
    • Embedding Collect Code via Google Tag Manager (GTM)
  • Encryption
  • SSJS Function Index
  • AMPscript
  • AMPscript Function Index
      • Add
      • Divide
      • Mod
      • Multiply
      • Random
      • Subtract
      • Char
      • Concat
      • IndexOf
      • Length
      • Lowercase
      • ProperCase
      • RegExMatch
      • Replace
      • ReplaceList
      • Substring
      • Trim
      • Uppercase
      • DateAdd
      • DateDiff
      • DateParse
      • DatePart
      • FormatDate
      • LocalDateToSystemDate
      • Now
      • StringToDate
      • SystemDateToLocalDate
      • Base64Decode
      • Base64Encode
      • DecryptSymmetric
      • EncryptSymmetric
      • GetJWT
      • GetJWTByKeyName
      • MD5
      • SHA1
      • SHA256
      • SHA512
      • StringToHex
      • URLEncode
      • BarcodeURL
      • BeginImpressionRegion
      • BuildOptionList
      • BuildRowsetFromJSON
      • BuildRowSetFromString
      • BuildRowSetFromXML
      • ContentArea
      • ContentAreaByName
      • ContentBlockByID
      • ContentBlockByKey
      • ContentBlockByName
      • ContentImageByID
      • ContentImageByKey
      • EndImpressionRegion
      • TransformXML
      • TreatAsContent
      • TreatAsContentArea
      • ClaimRow
      • ClaimRowValue
      • DataExtensionRowCount
      • DeleteData
      • DeleteDE
      • ExecuteFilter
      • ExecuteFilterOrderedRows
      • Field
      • InsertData
      • InsertDE
      • Lookup
      • LookupOrderedRows
      • LookupOrderedRowsCS
      • LookupRows
      • LookupRowsCS
      • Row
      • RowCount
      • UpdateData
      • UpdateDE
      • UpsertData
      • UpsertDE
      • AddObjectArrayItem
      • CreateObject
      • InvokeCreate
      • InvokeDelete
      • InvokeExecute
      • InvokePerform
      • InvokeRetrieve
      • InvokeUpdate
      • SetObjectProperty
      • HTTPGet
      • HTTPPost
      • HTTPPost2
      • HTTPPostWithRetry
      • HTTPRequestHeader
      • AttributeValue
      • AuthenticatedEmployeeID
      • AuthenticatedEmployeeNotificationAddress
      • AuthenticatedEmployeeUserName
      • AuthenticatedEnterpriseID
      • AuthenticatedMemberID
      • AuthenticatedMemberName
      • CloudPagesURL
      • Domain
      • Empty
      • Format
      • FormatCurrency
      • FormatNumber
      • GUID
      • IIf
      • IsCHTMLBrowser
      • IsEmailAddress
      • IsNull
      • IsNullDefault
      • IsPhoneNumber
      • MicrositeURL
      • Output
      • OutputLine
      • QueryParameter
      • RaiseError
      • Redirect
      • RedirectTo
      • RequestParameter
      • v
      • WrapLongURL
      • CreateSalesforceObject
      • LongSFID
      • RetrieveSalesforceJobSources
      • RetrieveSalesforceObjects
      • UpdateSingleSalesforceObject
      • GetSocialPublishURL
      • GetSocialPublishURLByName
      • UpsertContact
Next
  • Overview
  • AMPscript Function Index
  • Handlebars Helper Index
  • Differs from Official Docs
Tools
  • Catalog
  • Language Service article
  • Highlights
  • SFMC Language Service
  • MCP Server for SFMC Coding
  • SFMC DevTools
  • SFMC DevTools Pipeline Builder
  • SF Plugin for MCNext
  • Community
  • dataviews.io
  • Diagramforce
  • SSJS Manager
  • MCFS AMPscript
  • SFMC Companion
Home / Engagement / Einstein Recommendations

Einstein Recommendations

Working with Einstein Recommendations in Marketing Cloud Engagement.

Engagement
Originally published

First published 2020-09-27 in the SFMC Cookbook. Ported here for sfmc.guide.

This page aims to make using Einstein recommendations a little easier by adding a few explanations around how to use it in a modern setup.

  • Collect Code
    • Note to developers
    • Initialize the library
      • Collect Code on page load
      • Asynchronous Collect Code
      • Asynchronous Collect Code with preloading
    • Debug your tracking solution
    • Tracking and other Collect Code features
      • Disable tracking
      • Identify Business Unit for Tracking
      • Identify current user
        • Attribute Affinity
      • Track Page Views: trackPageView
      • Track Items in Cart: trackCart
      • Track Purchases / Conversions: trackConversion
        • Tracking overhead cost
      • Track Custom Event: trackEvent
      • Track User Wishlist: trackWishList
  • Update Catalog
    • Via Collect Code
    • Update Catalog via API
  • Predictive Intelligence (PI) Data Extensions
  • Einstein Email Recommendations
  • Einstein Web Recommendations
    • Embedding Web Recommendations
      • How the recommender knows who the current user is
      • Enhancing recommendation results
      • Embed via JSON
        • JSON Example responses
      • Embed via JavaScript (“HTML”)
        • JavaScript/HTML example code
    • Debugging Web Recommendations
  • Embedding Collect Code via Google Tag Manager (GTM)
    • Loading the GTM library
    • Loading collect.js via GTM
      • GTM: Developer Playground
    • Logging events via GTM
      • Identify current user via GTM
    • Debugging / Previewing your GTM setup
    • Publishing your changes
    • Events mapping: Collect Code to GA4 Retail/Ecommerce
Suggest an edit · Report an issue
sfmc.guide

Technical architecture for Salesforce Marketing Cloud Engagement and Marketing Cloud Next.

Sections

  • Engagement
  • Next
  • Tools

Related

  • ssjs.guide — SSJS reference

developer.salesforce.com

  • Handlebars
  • Ampscript
  • SSJS
  • MCE APIs
  • MCN APIs

© 2026 Jörn Berkefeld — LinkedIn · GitHub · Privacy ·

The views and opinions expressed here are my own personal views and do not represent those of any employer, client, or affiliated organisation. Not affiliated with or endorsed by Salesforce.