Gapi: Get e-commerce turnover - google-analytics-api

I need to get the e-commerce turnover from Google-Analytics via PHP. I already found the GAPI-class and successfully logged in, but couldn't find a way how to get the e-commerce turnover here. I need as well to split it up into organic and traffic from adwords... Any hints how to do this?

Related

Facebook graph api doesn't return currency

I have problem getting user local currency and usd-exchange rate from facebook, so this one: https://developers.facebook.com/docs/graph-api/reference/currency/
I'm trying to show my shop prices in local currency, just like fb shows prices in local currency in its own purchase dialog after facebook-purchase is launched.
I'm trying to get currency like this:
https://graph.facebook.com/v2.12/me?fields=id,name,currency&access_token=...
(Actually using Unity and Facebook's Unity SDK to do this, but exactly same thing happens when using url above.)
That have definitely worked before. I've also tried api version 3.2. It returns id and name, but no currency info of any kind. But it doesn't give any error message either, as it does with invalid fields.
I really can't find any useful info or help to this. Does getting currency require special permissions these days? But I can't find anything currency related from FB dev console App Review / Permissions and Features either.
Thanks!
Answering to my own question. It just seems that currency info is no longer available.
Starting from January 8th (2019) that field is no longer available for any apps:
https://developers.facebook.com/blog/post/2018/05/01/facebook-login-updates-further-protect-privacy/
There's discussion about this issue here, without any solution so far (may require having FB developer account to access):
https://developers.facebook.com/bugs/285780305453757/
There are some workarounds to get user currency like:
New way to detect Facebook API user currency
But that doesn't give you exchange rate to USD, so that isn't too helpful showing prices in local currency before Facebook's own purchase dialog is displayed.
Very unfortunate. Still, if someone knows way to get local currency and exchange rate that will surely match exchange rates used by FB, please let me know.

Business Verification for chatbot [duplicate]

This question already has answers here:
Facebook Messenger Chatbot for personal fan page
(2 answers)
Closed 3 years ago.
I created a chatbot using Dialogflow, I submitted it for review and the problem is: I dont have a business (just a page in facebook) for the "Business Verification" so no:
Business license (preferred)
Certificate of formation
Articles of incorporation document
Business utility or phone bill
Please, what is the solution for my case ?
Thank you!
As facebook is fighting to gain their image back after being involved in some major data breaches recently, they are asking Chatbot developers to connect their Bots to real businesses.
The business verification process will take time from weeks to months, requiring appropriated documents proving the page business is real!
I see, therefore, there's no chance to publish your bot now, or even in the future, without having any serious business for the page!
Thankfully, for people like you and me they are currently rolling out "Individual Verification":
If you submit your app for review and you are asked to complete business verification, but you don't own or run a business, you may be given the option to complete individual verification instead. By completing individual verification, you can gain full or limited access to the products listed below. [...]

Tracking custom fields in Adsense

I was wondering if it's possible to put a custom field onto an Ad Unit that could be used to filtering an API call, and be used to calculate that content's earnings to allow sharing revenue with the site's content creators.
There are more than 500 content creators and Custom Channels are limited to 500, so they cannot be used. I couldn't find any related question or article about that kind of customization.
Any hints? Thanks.
As I asked to the ADSense forum there is no way to add a custom tag to a banner and filtering by an API call. Me too I needed to share revenues with more than 500 publishers. Actually you can do that with the "ADSense Host" plan
https://developers.google.com/adsense/host/
Please note, only websites with over 100k daily page views are eligible to participate in the AdSense Host API program.

generic form for Seblod (joomla 2.5 )

I'm a developer who has taken over a Joomla website, which was creatied using SEBLOD. The website is a listings website, which has over 300 listings on.
The purpose of the website is to get enquiries through the listsings.
Currently, the queries are attached to a button - which opens your email program and sends the email. This is not ideal.
Is there a way to create and attach a generic enquiry box or form to each listing, and include the name of the listing in this form when its sent?
Is there a way to create a form that can be attached on the frontend of the website page intead of
the "Request a quote" button.
To be candid, seblod is an impressive Joomla app, but I'm afraid you might not be able to get useful answers than on their forum, I've been using it now for over a year and I'm just coming to terms with some of its functionality. Visit the forums and you should be able to find a good answer from the devs there. Its an expansive suite so it might give some unique challenges.

Facebook Credits and Foreign currency

I am developing an application that uses FB Credits as a currency, however, my clients are going to be paying in their local currency (ILS, israeli sheqel).
I know the rate for 1 credit is 10 cents, however, the price in ILS seems to be changing according to changes in the exchange-rates of USD-ILS.
Is there a way to query Facebook Server to know the prices users are going to be charged in their local money? Like a way to query the pricelist. Many new users don't understand the concept of credits and i'd like to show them what they're about to pay in local money.
The Facebook Credits API doesn't have exchange rate information available. You could request this feature on their developer group. You're best bet would be to pull down an exchange rate feed (there are tons available if you search) and display that with a warning that it is just an estimated rate and that it is dependent on the actual exchange rate Facebook uses.
xe.com is a great feed , you can also pull data from yahoo or google finance
As stated by OffBySome, Facebook do not have exchange rate information available. Thinking about this, I can see why they don't have this as they do not want you to display the local currency price for items. Although at the moment Facebook Credits are relatively new, and there is a lot of confusion for end users, eventually when it becomes widespread there won't be these issues.
I would suggest for now (as that is what I have done - here one Facebook Credit is currently ~7p) that you just hard code in your app the price of 1 Facebook Credit in your local currency, and if required display this. I think one of the reasons why Facebook don't support this is that they didn't envisage apps using Credits to be restricted to one territory, however in reality not everything is a game to be used worldwide. :)
Just to sum this question up, I tried two methods. One was to pull the rate every 10 minutes from openexchange using this python function:
def update_ils_rate():
print "Updating ILS/USD exchange rate"
url = 'http://openexchangerates.org/latest.json'
response = requests.request('get', url)
content = response.content
data = loads(content)
return data['rates']['ILS']
However it seems that facebook credits calculates ILS(israeli sheqel) rate according to a different rate (calculations were off by a little). So we have decided to pull xml data from israel's central bank, using this function:
import requests, BeautifulSoup
def get_ils_rate():
response = requests.request('get', 'http://www.bankisrael.gov.il/currency.xml')
content = response.content
soup = BeautifulSoup(content)
currencies = soup.findAll('currency')
for c in currencies:
if c.currencycode.contents[0]=='USD':
return float(c.rate.contents[0])