mboxCreate(mbox,params) - at.js 1.x
- Topics:
- at.js
CREATED FOR:
- Developer
Executes a request and applies the offer to the closest DIV with mboxDefault class name.
This function is built into at.js mostly to ease the transition from mbox.js (now deprecated) to at.js. A newer alternative to mboxCreate()
is adobe.target.getOffer()
/ adobe.target.applyOffer()
or the Angular directive.
Example
<div class="mboxDefault">
default content to replace by offer
</div>
<script>
mboxCreate('mboxName','param1=value1','param2=value2');
</script>
Notes
mboxCreate()
now uses the “json” endpoint instead of the “standard” endpoint and fires asynchronously. Because of this:
-
Debugging is a little different.
-
Avoid offer code requiring synchronous, blocking calls.
For example, offers that set JavaScript variables that are used by site code or other mboxes that come later on the page.
-
Be sure to have a
<div class="mboxDefault"></div>
before invokingmboxCreate()
, because at.js will not add one for you. -
Empty, top-of-page
mboxCreate()
functions are not recommended as a global mbox.The auto-created global mbox in at.js is a better option because it fires from the
<head>
and can return content earlier.
Target
- Adobe Target Developer Guide
- Getting started
- Before you implement
- Privacy and security
- Privacy overview
- Privacy and data protection regulations
- Target cookies
- Delete the Target cookie
- The impact of third-party cookie deprecation on Target (at.js)
- Google Chrome SameSite cookie policies
- Apple Intelligent Tracking Prevention (ITP) 2.x
- Content Security Policy (CSP) directives
- Allowlist Target edge nodes
- Methods to get data into Target
- Target security overview
- Supported browsers
- TLS (Transport Layer Security) encryption changes
- CNAME and Adobe Target
- Client-side implementation
- Overview: implement Target for client-side web
- Adobe Experience Platform Web SDK implementation overview
- at.js implementation
- at.js overview
- How at.js works
- How to deploy at.js
- On-device decisioning
- at.js functions
- at.js functions overview
- adobe.target.getOffer()
- adobe.target.getOffers() - at.js 2.x
- adobe.target.applyOffer()
- adobe.target.applyOffers() - at.js 2.x
- adobe.target.triggerView() - at.js 2.x
- adobe.target.trackEvent()
- mboxCreate() - at.js 1.x
- targetGlobalSettings()
- mboxDefine() and mboxUpdate() - at.js 1.x
- targetPageParams()
- targetPageParamsAll()
- registerExtension() - at.js 1.x
- sendNotifications() - at.js 2.1
- at.js custom events
- Debug at.js using the Adobe Experience Cloud Debugger
- Use cloud-based instances with Target
- at.js FAQs
- at.js version details
- Upgrading from at.js 1.x to at.js 2.x
- at.js cookies
- User-agent and client hints
- Understand the Global mbox
- Server Side implementation
- Server Side: implement Target overview
- Getting started with Target SDKs
- Sample apps
- Transition from Target legacy APIs to Adobe I/O
- Core principles
- Integration
- On-Device Decisioning
- Node.js SDK Reference
- Java SDK Reference
- .NET SDK Reference
- Python SDK Reference
- Hybrid implementation
- Recommendations implementation
- Mobile app implementation
- Email implementation
- API guides
- Implementation patterns