Last active
December 29, 2019 17:23
-
-
Save nyancodeid/274d1eed54cf643a3f71f29f2517eff6 to your computer and use it in GitHub Desktop.
Admob on Web
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var pubId ='YOUR-PUB_ID'; var s1 ='3888837065'; var appId = 'com.app_dev_coders.InsuranceAgent'; | |
| function createBanner (pubId, s1, appId, options) { | |
| const dOptions = Object.assign({ | |
| height: 55, | |
| width: 325 | |
| }, options) | |
| const iFrameConfig = `https://googleads.g.doubleclick.net/mads/gma?preqs=0&u_sd=1.5&u_w=320&msid=${appId}&cap=a&js=afma-sdk-a-v3.3.0&toar=0&isu=W%27+Math.floor%28Math.random%28%29*9%29+%27EEABB8EE%27+Math.floor%28Math.random%28%29*99%29+%27C2BE770B684D%27+Math.floor%28Math.random%28%29*99999%29+%27ECB&cipa=0&format=320x50_mb&net=wi&app_name=1.android.${appId}&hl=en&u_h=%27+Math.floor%28Math.random%28%29*999%29+%27&carrier=%27+Math.floor%28Math.random%28%29*999999%29+%27&ptime=0&u_audio=4&u_so=p&output=html®ion=mobile_app&u_tz=-%27+Math.floor%28Math.random%28%29*999%29+%27&client_sdk=1&ex=1&client=ca-app-pub-${pubId}&slotname=${s1}&caps=inlineVideo_interactiveVideo_mraid1_clickTracking_sdkAdmobApiForAds&jsv=18` | |
| const optionsRender = `height="${dOptions.height}" width="${dOptions.width}" frameborder="0" scrolling="no" width="0" height="0" marginwidth="0" marginheight="0"` | |
| document.write(`<div align="center"><iframe src="${iFrameConfig}" ${optionsRender} /></div>`) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment