click thru macro

301 views
Skip to first unread message

Nedved Yang

unread,
Jul 8, 2013, 11:07:02 PM7/8/13
to google-adm...@googlegroups.com
Hi,

I am adding DFP click thru macro, %%CLICK_URL_ESC%%. It works good when the creative is a mobile web ad, while for in-app, the click thrus are always 0. May I know any special handling is needed for admob SDK when it comes to the click thru macro replacement?

regards
Nedved

Nedved Yang

unread,
Jul 9, 2013, 10:24:05 PM7/9/13
to google-adm...@googlegroups.com
Hi,

I have also tested with the sample ad shared by Eric attached without luck,

regards
Nedved 
AdmobOwnTestTag.txt

Rajkumar Parameswaran

unread,
Jul 15, 2013, 12:29:50 PM7/15/13
to google-adm...@googlegroups.com
It depends on how you're using it. If you're using it some something like admob.opener.openUrl(), you should be using %%CLICK_URL_UNESC%%. If you're passing it to a third party, then %%CLICK_URL_ESC%% would be appropriate. It'd depend on what your creative is doing.

But no, there shouldn't be anything specific that prevents click URLs from working on the SDK. If it works on the web it should work in the SDK.


Nedved

--
 
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Nedved Yang

unread,
Jul 15, 2013, 12:46:48 PM7/15/13
to google-adm...@googlegroups.com
Thanks Raj,

I am running MRAID ads. I have tested the MRAID creative shared by Eric captured below and the click through tracker is not fired as in "<div id='overlayBanner' class='overlayBanner' onClick='mraid.open("%%CLICK_URL_ESC%%http://www.google.com")'></div>" . Could you share how I should add DFP click through trackers for mraid ad?

<html>

  <head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <meta name="viewport" content="user-scalable=no, width=device-width,initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"/>

    <script type="text/javascript" src="mraid.js"></script>

    <style type="text/css">

      html, body {

        margin: 0;

        padding: 0;

      }


      .banner, .overlayBanner {

        display: block;

        position: absolute;

        top: 0px;

        left: 0px;

        z-index: 1000;

        overflow: hidden;

      }


      .banner {

        background-color: orange;

        width: 300px;

        height: 50px;

      }


      .overlayBanner {

        background-color: green;

        display: none;

        width: 300px;

        height: 250px;

      }

    </style>

    <script type="text/javascript">

      // Check to see if document is ready

      //mraid.setExpandProperties({'useCustomClose':true});

      mraid.useCustomClose(true);

      if ((mraid.getState() != "default") || (mraid.getState() != "ready")) {

        // console.log("Document is not ready, adding event listener");

        // Register event listener to keep track of state changes

        mraid.addEventListener("stateChange", handleStateChanges);

      } else {

        // console.log("Document is ready");

        // Register event listener to keep track of state changes

        mraid.addEventListener("stateChange", handleStateChanges);

        handleStateChanges();

      }


      function handleStateChanges() {

        // console.log('mraid state: ' + mraid.getState());

        // Perform action on state change

        switch(mraid.getState()) {

          case "expanded":

            // console.log("handleStateChanges, expanded");

            // Show the overlay banner when view is in "expanded" state

            expand();

            break;

          case "default":

            // console.log("handleStateChanges, default");

            // Show the initial banner when view is in "default" state

            close();

            break;

        }

      }

      function expand() {

        document.getElementById('banner').style.display = 'none';

        document.getElementById('overlayBanner').style.display = 'block';

      }


      function close() {

        document.getElementById('overlayBanner').style.display = 'none';

        document.getElementById('banner').style.display = 'block';

      }

</script>

</head>


<body>

<div id='banner' class='banner' onClick='mraid.expand()'></div>

<div id='overlayBanner' class='overlayBanner' onClick='mraid.open("%%CLICK_URL_ESC%%http://www.google.com")'></div>

</body>


</html>


To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.

Rajkumar Parameswaran

unread,
Jul 19, 2013, 5:14:19 PM7/19/13
to google-adm...@googlegroups.com
Have you tried using CLICK_URL_UNESC already as well.


--
 
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.

Nedved Yang

unread,
Jul 21, 2013, 11:17:10 PM7/21/13
to google-adm...@googlegroups.com
Hi,

Yes, tried without luck.

regards
Nedved

Thanks
regards
Nedved

Nedved Yang | R&D Director | Crisp | 66B Tras Street, Singapore 079005| Mobile: +65 9657 4649 | nedve...@crispmedia.com | Skype: nedved.yang |


--
 
---
You received this message because you are subscribed to a topic in the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-admob-ads-sdk/pLvz2Yup2VE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-admob-ads...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages