Can't get Image URL from Google Ads API for HTML5 Ads - google-ads-api

I'm trying to get access to Display Ad images via the Google Ads API. At the moment, my code doesn't seem to be working for certain ads. As near as I can tell from my debugging efforts so far, the issue is that it's not working for HTML5 ads.
Here is the query I'm using :
SELECT
ad_group.name,
campaign.name,
ad_group_ad.ad.responsive_display_ad.logo_images,
ad_group_ad.ad.responsive_display_ad.marketing_images,
ad_group_ad.ad.image_ad.preview_image_url,
ad_group_ad.ad.image_ad.image_url
FROM
ad_group_ad
WHERE
campaign.advertising_channel_type = \'DISPLAY\'
LIMIT
100
For accounts using HTML5 ads, there is nothing returned for any of the last (4) fields. For other accounts, I'm using the "ad_group_ad.ad.image_ad.image_url" field to get the ad image.
What am I missing?

ad_group_ad.ad has a pseudo-attribute ad_data which is a Union field that will have one specific, effective name depending on what type of ad is represented. See the documentation of the Ad resource.
Specifically, this means that all fields below ad_group_ad.ad.image_ad such as image_url will only be populated for an ad of type IMAGE_AD. Similarly, ad.responsive_display_ad.* will only contain data for ads with type RESPONSIVE_DISPLAY_AD.
For an HTML5 ad, you can access the available fields using the selector ad_group_ad.ad.display_upload_ad. You won't be able to obtain an image of the ad, however.

Related

How to avoid collection_size_error: TOO_MANY error while makin google ads api call to upload user data

I want to upload user details(hashed email, mobiles) to audiences that I have created in google ads.
But I am getting collection_size_error: TOO_MANY when the userList size is greater than or equal to 10. How to fix this?

iOS: How to track firebase dynamic link

i have added UTM parameter using FIRDynamicLinkGoogleAnalyticsParameters
FIRDynamicLinkGoogleAnalyticsParameters *analyticsParams =
[FIRDynamicLinkGoogleAnalyticsParameters parametersWithSource:Source
medium:Medium
campaign:Campaign];
analyticsParams.term = Term;
analyticsParams.content = Content;
components.analyticsParameters = analyticsParams;
Now i want to track the dynamic link like this,
if i have shared on Facebook, any one tap on that link then it will go to application if there else it will go to App Store.
After i need to show message based upon it’s source i.e welcome from Facebook like message.
So can we track dynamic link and check from where the link has been tapped and show relevant message based upon i’t source.
Can anyone explain how to implement this:
https://firebase.google.com/docs/dynamic-links/analytics
By adding these tracking parameters to your Dynamic Links, Google
Analytics and iTunes Connect can treat them like any other campaign
it's measuring attribution reporting for, and you can view conversion
events not just by the ad campaigns responsible for bringing in those
users, but also by which Dynamic Links might have brought them in.
The following parameters are passed to Google Analytics: utm_source,
utm_medium, utm_campaign, utm_term, utm_content, gclid
The following parameters are passed to the App Store: at, ct, mt, pt
The same question was asked in this thread:
App link tracking with Firebase
Also I had posted this question on Firebase GitHub and got the reply:
https://github.com/firebase/firebase-ios-sdk/issues/4775
You can't track where the link was tapped from unless you create a
custom link (or add custom parameters) for each source, but even then
this will result in mismatches if a user ever copies a link and shares
it to a different source.

Parse SDK iOS Analytics

I am working with Parse SDK in my iOS Application. I have integrated Parse Facebook SDK with my Application. I just want to do an analytics based on Users not overall count like we can give read count or something. (e.g) I want to do know the current user's access count of modules which I am having in my application and overall How many users have visited the particular module in certian period of time.Please help me out on this.Thanks in advance
What you are looking for is the [PFAnalytics trackEvent: dimensions:] call. This allows you to track an event with a particular name as an NSString and provide dimensions as an NSDictionary.
Here's an example of what you could put in the loading code for each module:
NSDictionary *dimensions = #{
// Define the user via whatever unique ID you use
#"user": userId,
// Define the name of the module that is being loaded
#"module": #"moduleName",
};
// Send the dimensions to Parse along with the 'search' event
[PFAnalytics trackEvent:#"moduleLoad" dimensions:dimensions];
To get a total number of events, you will need to use the Parse.com dashboard. You may also need to download the events log and sum it via Excel.
Also, if you are looking for analytics tracking that is more robust at the user-level, I recommend http://www.mixpanel.com

Mocean ad(158212768) - Server response with empty body (no ads) error?

I am using mocean's interstitial ad in my iOS project.
I am able to display dummy ads using dummy site_id and zone_id.
But when I replace dummy site_id and zone_id with my own ids, it gives following error -
Ad ad(158212768) - Server response with empty body (no ads) | error: Error Domain=Server response with empty body (no ads) Code=22 "The operation couldn’t be completed. (Server response with empty body (no ads) error 22.)"
Please help me to resolve this problem.
Thank you in advance.
What ads provider do you use? As far as i know, there are several companies, that use mOcean SDK for iOS for advertisements (YOC Performance, Mojiva).
Possibly, you need to setup adServerUrl property of your newly created MASTAdView class object. For Mojiva, for example, it must be #"http://ads.mojiva.com/ad". For YOC Performance it is #"http://ads.mo.yoc-adserver.com/ad", but i'm not sure about it.
PS: also, as you wish to aggregate more than one advertiser in you ios app (and want to manage ads displaying for different regions and countries and much more for growing your revenue from application), there is good alternative to AdWhirl - Epom SDK for iOS

Using AdMob solely for House Ads

I am updating one of my iOS apps to include Ads. However, I would only like to show own ads on contracts I sell to local companies. I believe AdMobs is a good enough for that since I can add my own "House ads", but I would like to "disable" AdMob to show any other ads from what I choose to show.
Is this possible? Or should I do this any other way, and if so.. how? (Any frameworks or services I can use?)
EDIT
To make my question a bit more clear: I believe I cannot use AdMob solely for house-ads, so how can I achieve using an external "partner" for house-ads only. Can it be done in the code for AdMobs, or should I use an other framework/partner?
It sounds like you're looking for a product like DoubleClick for Publishers where you can manage your own inventory. DFP is also integrated with AdMob, so you can use the AdMob SDK to send requests to your DFP network.
If you mean you only want to show House Ads and nothing else, then yes this can be done.
When you create an ad campaign, assign 100% of the ad allocation for your application to the house ads. Then no paid ads will show up in your app.
Using AdMob you can achieve both third party advertising and sole house-ads using Custom Events. You can run fixed inventories of house-ads using Impression Goal Campaigns. If those house ad inventories run out AdMod we revert to eCPM based ad serving which will select the highest eCPM. To get sole house-ads add a new Custom Event in the AdMob management interface and set it's eCPM to something higher than what the AdMob Network would typically produce. See: Ad sources ordered by eCPM. Finally in Android implement your custom event as a class (com.appname.NoDisplayCustomEvent) inside your application to (1) show an AdMob ad, (2) show a hand made ad or (3) do nothing.
public class NoDisplayCustomEvent implements CustomEventInterstitial {
CustomEventInterstitialListener listener;
public void requestInterstitialAd(Context context, CustomEventInterstitialListener interstitialListener, String params, MediationAdRequest request, Bundle extra) {
listener = bannerListener;
if ( ... some criteria ... )
// Do custom event
listener.onAdLoaded();
else
// Show AdMob
listener.onAdFailedToLoad(AdRequest.ERROR_CODE_NO_FILL);
}
public void showInterstitial() {
listener.onAdOpened();
listener.onAdClosed();
}
...

Resources