The Creative AdKit declaration replaces the standard EBLoader declaration. This action automatically updates the index.html with dynamic adkit-HTML data when the ad is served.
You can replace this declaration because AdKit references the EBLoader, while retaining all the existing EBLoader functionality.
- Open index.html in a text editor.
- Copy the following code to the index.html file.
Note: Ads running on secure HTTPS servers should use:
- Remove the existing EBLoader declaration from index.html.
- Add the AdKit load-wait code which replaces the EBLoader load-wait code.
Many ads use EBLoader APIs to perform a variety of actions, and include code which waits for EBLoader to load before referencing any API functions.
The EBLoader code segment usually looks like this: (In this example, "startAd" is the name of the JS function which executes after EBLoader has loaded).
This is the AdKit replacement code.
- Test your ad to see that this transition is successful, that your ad previews and serves correctly.