Not all currencies can be set to a view (profile) via the API - google-analytics-api

When using the Google Analytics Management API to manage profiles, not all currencies can be set via the API. In the interface there are more currencies available.
The currency type associated with this view (profile), defaults to USD. The supported values are:
ARS, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, INR, JPY, KRW, LTL, MXN, NOK, NZD, PHP, PLN, RUB, SEK, THB, TRY, TWD, USD, VND, ZAR
In the interface you can set for example LVL or VEF.
Is this a bug? Or what's going on?

Apparently that was an issue with the API.
See the Google Analytics Management API Changelog.
This is a bug fix release; it fixes an issue where a subset of
currencies were supported in the Analytics web
interface but not in the
API.
This release adds support for the following currencies:
UAH, AED, BOB, CLP, COP, EGP, HRK, ILS, MAD, MYR, PEN, PKR, RON, RSD, SAR, SGD, VEF, LVL
For more information see:
The Views (profiles) reference.
The Currency reference help
center article.
It appears to be fixed now.

Related

New Google Sites API

I know the current Google Sites API only supports Classic Sites.
Does this API exist now? and How to manage(create and etc) New Google Sites though API?
No, an API doesn't exist.
There are several feature requests in the issuetracker.google.com site, so they are aware it is needed. You would think they have some of the framework developed, since there is currently some access to sites (and I don't mean for editing) through the existing drive API. It would be worth adding your comments to those requests in the issue tracker website.
https://issuetracker.google.com/issues/36761330
https://issuetracker.google.com/issues/7324991
https://issuetracker.google.com/issues/120462223
https://issuetracker.google.com/issues/205856782
Though Google Sites API is still not available, I discovered some good news (for my use case, at least). I can confirm there are some minimal Google Sites abilities available through the Google Drive API. Specifically, I was able to add a user to the my site as viewer to a published site, using the Drive API permissions. Here is the Python code.
# get boilerplate creds= code from here https://developers.google.com/drive/api/quickstart/python
drive = build('drive', 'v3', credentials=creds)
new_permission = {
'type':'user',
'role':'reader',
'view':'published',
'emailAddress':USER_EMAIL
}
# you can get the SITE_FILEID from the site url
res = drive.permissions().create(fileId=SITE_FILEID, body=new_permission).execute()
Since the OP specifically asked about create, that works like so:
new_file = {
'name':'test site2',
'mimeType':'application/vnd.google-apps.site',
}
res = drive.files().create(body=new_file).execute()
Hope this can help some folks.
If you check Google sites api at the very top of the page it states.
If there was an api for accessing the new version they would have stated it. There is not.
According to this question, Google planned the new API for Google Sites for end of 2021: https://support.google.com/sites/thread/3363462/is-there-any-eta-for-the-new-google-sites-api?hl=en
I did not hear any news, since that.

GetApplicablePromotions is returning promotions with wrong product

I have created a gift purchase promotion particular items(like on purchase 5 X soaps get 10% discount) and using GetApplicablePromotionNames droplet for displaying those promotions on the items. GetApplicablePromotionNames is returning this promotion for the correct item but not validating pmd rules which has been configured with some customize property.I was validating channel of order should be STORE but for the product promotion displaying for channel=WEB as well.
I suspect you have encountered a known issue with version 10.1.2 with the EverythingQualifierService. The workaround is as follows:
Reconfigure the filters property of the EverythingQualifiesService.properties file to use the EverythingQualifiesService instead of the QualifierService.
There are a number of other known issues with promotions and the full list can be found with Oracle Commerce 10.1.2 Release Notes.

How can I use automatic bid pricing on the Facebook Ads API?

I'm using the Facebook Ads API to create Page Post Engagement ads. The API is in general a breeze to use but I can't seem to find a way to set automatic bid pricing or, in other words, achieve this:
rather than this, which is what I'm getting:
My ad set is being created with bid_type: "ABSOLUTE_OCPM" and bid_info: "{'ACTIONS':500}". bid_info is a required parameter so I can't leave it out. Setting it to 0 doesn't work either.
Any ideas?
bid_info is required only if you set is_autobid to false, which you need to set to true when you create your set.
With bid_type: "ABSOLUTE_OCPM" and bid_info: "{'ACTIONS':500}" you are saying that you'd like to bid 500 units of account's currency on action, which are expressed in cents. And as you are requesting Optimized CPM, you say how much the fulfillment of a particular goal is worth to you, therefore the $5.00 USD always show up there. As per FB Optimized CPM documentation these values are not bids.
There is no official way to set automatic bid via API. Moreover, usually you can just use oCPM and bid the same amount used by Facebook when you create a campaign using the automatic bid. Then PowerEditor will show you that you're using automatic bid.
=== NEW FROM v2.3 ===
From version 2.3 there is the is_autobid field. By setting it to true Facebook will set the bid value automatically. You can read more here: https://developers.facebook.com/docs/marketing-api/adset/v2.3#create

Getting Logos from Sites with SiteInfo

We are attempting to get site logos from the Yodlee API. From the SiteInfo data model (using the SOAP API), there are the following methods that appear to retrieve site logos
siteInfo.getDefaultSiteLogo()
siteInfo.getLocalizedSiteLogos()
getDefaultFavIcon()
The issue is that these methods for the sites we are using (all sites with the AU geography) are returning null.
I am pretty sure this is possible to do, since Yodlee's own fastlink does show logos for sites as you are adding them.
Here are the method call signatures
I am using the soap api through java (using axis 1.4, just like in the sample code) and the API signatures are as follows
SiteAccountManagementService has the method getAllSiteAccounts which has the following signature
com.yodlee.soap.collections.core.accountmanagement.ArrayOfSiteAccountInfo getAllSiteAccounts(com.yodlee.soap.common.UserContext userContext).
Then there is also getCctx, which has the following signature
public com.yodlee.soap.common.CobrandContext getCctx()
None of these methods have a request specifier parameter of any sought
I don't think icons will be returned by default. I believe you need to specify this in your request specifier to get icons/image.
getAllSiteAccounts API is to get the details for the Accounts aggregated by a consumer,
while the information you are looking for(the Logos) are site related not consumer related.
You should use getSiteInfo(under SiteTraversal) to get this specific detail and remember to pass value of siteFilter.reqSpecifier as 128.

Google Analytics for iOS, how to set domain?

I am trying to port this javascript version of GA to native iOS SDK
pageTracker = _gat._getTracker("UA-XXXXXXX-1");
pageTracker._setDomainName(".test.org");
pageTracker._trackPageview();
I know how to set the UA account and how to report a pageView, but how do I set the domain name ?
[[GANTracker sharedTracker] startTrackerWithAccountID:#"UA-XXXXXXX-1"
dispatchPeriod:kGANDispatchPeriodSec
delegate:nil];
if (![[GANTracker sharedTracker] trackPageview:#"/"
withError:&error]) { // Handle error here }
Just following up from my comments. You don't need domain in the Google Analytics native code tracker for iOS. It's used on the web so you can track traffic at a more granular level on sites where multiple sub-domains might be used. For example, if you have a generic "Products" web page, but the same Products page lives on dogs.mystore.com/products and cats.mystore.com/products, and you want to use the same tracker but differentiate the traffic between those two sites, you can leverage the domain variable in the Javascript API. I can't think of a use case like this where it would be needed behind a native app.
Here's a reference for it related to the JavaScript API
https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite
Bottom line, it's not needed. :)