Google Analytics eCommerce data with payment gateway callback - e-commerce

We use WorldPay as our payment gateway and we've specified the callback URL to be myurl.com/payment.php, however worldpay doesn't actually redirect to this URL, it passes some parameters to it, ie, whether the payment was successful, how much for, etc and then displays the result through a worldpay server.
What I want to do is implement Google Analytics eCommerce tracking (instructions found here: http://code.google.com/apis/analytics/docs/tracking/gaTrackingEcommerce.html ). But this requires javascript which isn't enabled on the worldpay server.
I could do an immediate meta refresh to myurl.com/analytics.php which displays, aesthetically the same screen, but is actually on our server, so the JS will work.
The question is, how do I pass the cartID, if i'm using a meta refresh?

See: http://www.tatvic.com/blog/google-analytics-worldpay-ecommerce-tracking

Related

API to check Periscope User is Online

I've scoured for any information regarding an Open API for Periscope.
I have a twitter feed, that should only show if Periscope is Live (the said user will share the broadcast via Twitter).
I can parse the word "IS LIVE" but then I'd have to parse multiple languages.
I'm looking to check an API if the user is Online in periscope, if so, then display the latest twitter feed (which is the broadcast).
There was this User Online button that could be generated
https://www.periscope.tv/embed
it calls an api like https://embed.periscope.tv/user/bpsdmik.json
but it seems that the certificate is invalid, so I keep getting errors ..
Any help / workarounds would be much appreciated!
I've Searched OPEN Periscope, but mostly requires an Authentication token etc.
There is no open API for Periscope. At least, not that I'm aware of. Which would explain your difficulty in finding anything. The closest thing would be the Unofficial Periscope API, documented by Pmmlabs (the same folks who run the OpenPeriscope project). However, as you've already discovered, most of the calls to the Periscope API, including all user-related calls, require an auth token.
Outside of using the API or screen scraping, the only other way I can think of to tell if a user is live or not is to try accessing their Periscope page directly. When you go to a user's Periscope page at https://www.pscp.tv/{userId}, Periscope will redirect you to that users most recent broadcast, where you can parse the broadcast id from the redirect URL. Once you have the broadcast id of the most recent broadcast, you can use the following API call (which does not require an auth token):
https://api.periscope.tv/api/v2/getAccessPublic?token={broadcastId}
... to determine whether the broadcast is live or not. Look at the JSON response and if the "type" field equals "StreamTypeReplay", then it's a replay, otherwise it's a live broadcast.

How to get an affiliate reports via ebay API call?

I'm would like to access my affiliate reports via API? is that possible? I've already made a search on ebay API but I didn't find request for affiliate report.
You can do so, but the functionality is not handled by the eBay Developer program. Instead, you'd request the data from eBay Partner Network. They have a loose "API" for scripting access to your Transaction Download Report.
Follow the instructions for TDR here.
For accessing web-UI reports inside the ePN portal, you might need to scrape them. I think you can at least have un+pw parameters in your login URL. You'll have to look around the ePN site at the link above and see about details like that.

BigCommerce Customize checkout page

I'll be precise, i have been trying to add a custom gateway to bigcommerce, i have been somewhat successful till now, now i am stuck on bypassing the checkout page, i am unable to add additional option in checkout payment options, i'm able to do it using javascript, but then order is not being processed, and second thing, even if i am able to add option, and redirect user using javascript, how am i suppose to empty the cart once user has returned to the site?
I'm completely stuck here, any help or pointing to the right direction would be greatly appreciated.
For anyone who wish to achieve the same as i needed to, here is i went about it,
i didn't touch the actual flow of the order and checkout, what i did, i renamed one of the offline payment method as the third-party gateway i wanted to integrate, then after checkout, user lands of thank-you page, on thank-you page, i embedded my script, which picked up order-id from thank-you page, and checked the payment method that was used during checkout, if it matches the one i required, then i redirected user to external url ( additional domain on another hosting ), where user and order details were fetched using order_id ( which i sent via ajax ) and the payment was processed, and in the end, user is redirected back to the bigcommerce store.
Things that you will need
Additional domain
Additional hosting, to point that domain to, and to execute payment-gateway processing code and also to update order status in bigCommerce via their API.
It is kind of a complicated process, but once you get the hang of it, it becomes pretty simple after that.

Get historical data using Instagram API endpoints.

I am trying to fetch data using the Instagram API endpoints. Steps that I have followed
1. Register the client app.
2. Got the access token.
3. I am using this access token through out the url endpoints.
Ex. to get the data for recent media I am using this url endpoint: https://api.instagram.com/v1/users/self/media/recent/?access_token=ACCESS-TOKEN
However as I am in Sandbox mode, as per the documentation I get only the recent 20 media. Whereas my account contains in total 291 media.
Problems that I am facing:
Not able to get next_url in the paginationpart.
Usage of min_id and max_id in the url does not respond to any changes in the output or the data i.e fetched (Still get only 20 records/media)
Ex: https://api.instagram.com/v1/users/self/media/recent?access_token=XXXXXX&min_id=xxxxxx_xxxxx&max_id=xxxxxxx_xxxxxxx
Can anybody provide a solution as to how exactly I should get all of my historical data ?
You're in the sandbox mode so there's no way to achieve what you're trying to do before your app has been reviewed and approved (and gone live). From Instagram API documentation:
After your app has been reviewed and approved, you are ready to make it available to the general public. To switch your client from sandbox to live mode, you can use the button on the top section of the configuration screen for your app. When you are live, any Instagram user will be able to authorize your app, but you will have access only to the permissions that you were granted during the review.
Well, maybe you should try this library that allows you to scrape public info withou auth (client_id or access_token): https://github.com/raiym/instagram-php-scraper
$medias = Instagram::getMedias('kevin', 150);

How publish Hootsuite on Google+ Pages stream?

I want to achieve the same as Hootsuite, publish a post in a PAGE STREAM. But I don't know even where to look for it. It looks like Hootsuite is using the API, because they prompt an open Auth authentication where the user selects and authorize what this APP can do with his data.
With the PHP client I've been able of posting in the user APP stream (different from the user main stream) using moments class, and get data from the user using plus class client, both from the PHP library available here: https://code.google.com/p/google-api-php-client/source/checkout
But I don't know how to write in a user's page. Does anyone knows or can point me where to go to, at least, publish on main Google+ page stream as Hootsuite? Thanks.
The Google+ Pages API is currently available to a limited number of parters only, including HootSuite. You can request access to the API at https://developers.google.com/+/api/pages-signup but there is no guarantee when, or even if, Google will approve your access.
Although you can use the HootSuite console to post messages to Google+ pages (see http://hootsuite.com/google+), it isn't clear if you can use the HootSuite API to do so.