Google Analytics' push not received on Drupal Commerce - drupal

I've read a lot of people having this problem on tracking orders' event on Drupal Commerce site, but I didn't find any convincing reply according to my context. That's why I'm asking here for help.
First of all, here's what I can say about the context i'm working on :
Drupal 7.43 with Drupal Commerce
GA, Commerce GA, and GA Push modules are installed
I can receive tracking datas from visits, pages viewed, etc
For commerce tracking, I tried the 4 sending methods (JS, SSGA PHP, UTMP PHP, UTMP JS), and none of it worked
The Rule triggered for sending data to GA is working (I tried adding an email sending to the Rule, and I received it)
If I manually type this script, I can see data on GA :
(in Chrome's Developer Tools)
_gaq.push(["_addTrans", "578", "Patrick Frey", "56", "0", "0", "Paris", "", "France"]);
_gaq.push(["_addItem", "578", "130", "Test", "No category", "10", "1.00"]);
_gaq.push(["_addItem", "578", "shipping", "Free shipping", "No category", "0", "1.00"]);
_gaq.push(["_trackTrans"]);
Is someone have an idea of what's going on with my GA Pushs ? I'm working on a production site so I can't really try, but if someone have an idea of how i could debug this, this would be great !
Thanks,
Tristan

Related

Getting an unauthorized_scope_error on an existing application with r_liteprofile

We followed this guide: https://learn.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/migration-faq#what-permissions-do-i-have-access-to
All developer applications created on the LinkedIn Developer Portal
after January 14, 2019 have access to the LinkedIn v2 API by default.
Alternatively, if your developer application has made a successful
LinkedIn v1 API request from September 1, 2018 to December 17, 2018,
your developer application has immediate access to the v2 API.
We also meet the criteria here regarding successful API requests between that time period.
We made the switch shortly before the holidays(as soon as they sent the announcement) and since the last week, we've started seeing this for new signups:
unauthorized_scope_error | Scope "r_liteprofile" is not authorized for your application
Should we revert back to r_basicprofile for now?
This is for "Sign in with Linkedin".
This is the GET request: https://www.linkedin.com/oauth/v2/authorization?client_id=XXXX&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Flinkedin%2Fcallback&response_type=code&scope=r_liteprofile+r_emailaddress&state=XXXX
This is the response redirect: http://localhost:3000/auth/linkedin/callback?error=unauthorized_scope_error&error_description=Scope+%26quot%3Br_liteprofile%26quot%3B+is+not+authorized+for+your+application&state=XXXX
Thanks!
I was running into this today, and the step I was missing was I needed to add the "Sign In with LinkedIn" product to my app.
The terminology here is quite strange, but the screenshots help. You need to visit the "products" page on the developer portal (url like: https://www.linkedin.com/developers/apps/[your app id]/products)
After you do this and your request is approved (took <5 min for me) then the "OAuth 2.0 scopes" listed under the "Auth" tab will be expanded to include "r_emailaddress" and "r_liteprofile".

Custom Route Extension, Access Denied

I tried to send the example request in the guide on Custom Route Extension API with my app_id and app_code inserted, shown below. I sent it by entering it in my google chrome browser.
http://cre.cit.api.here.com/2/overlays/upload.json?map_name=OVERLAYBLOCKROAD&overlay_spec=[{"op":"override","shape":[[50.10765,8.68774],[50.10914,8.68771]],"layer":"LINK_ATTRIBUTE_FCN","data":{"VEHICLE_TYPES":"0"}}]&storage=readonly&app_id={YOUR_APP_ID}&app_code={YOUR_APP_CODE}
Indented for readability:
http://cre.cit.api.here.com/2/overlays/upload.json?
map_name=OVERLAYBLOCKROAD&
overlay_spec=[{"op":"override",
"shape":[[50.10765,8.68774],
[50.10914,8.68771]],
"layer":"LINK_ATTRIBUTE_FCN",
"data":{"VEHICLE_TYPES":"0"}}]&
storage=readonly&
app_id={YOUR_APP_ID}&
app_code={YOUR_APP_CODE}
But I get this fault code:
{"faultCode":"s8c73866c-b4a0-4078-90b7-b4d7529c947d",
"responseCode": "403",
"message":"Feature level access has been denied"}
Is Custom Route Extension API not available for trial users?
On their website under "pricing" you will see that custom route extension is indeed a paid feature.
https://developer.here.com/plans#advanced_features

Actions on Google responds with "Sorry, I didn't get any response."

I am following this code lab Facts about You: Build a conversational app for the Google Assistant
I had it working once but must have done something wrong because now all. To be 100% clear i have deleted everything on my pc downloaded the code from Git again deleted the project in actions console deleted the project in api.ai. This is the result of a completely new install. I have not changed anything in the code lab.
"Sorry, I didn't get any response."
The request apears to be sending corectly
From actions test:
{
"conversationToken": "CiZDIzU5Ym...",
"debugLevel": 1,
"inputType": "KEYBOARD",
"locale": "en-US",
"mockLocation": {
"city": "Mountain View",
"coordinates": {
"latitude": 37.421980615353675,
"longitude": -122.08419799804688
},
"formattedAddress": "Googleplex, Mountain View, CA 94043, United States",
"zipCode": "94043"
},
"query": "tell me about cats",
"surface": "GOOGLE_HOME"
}
Received in fire-base
[{"name":"actions.capability.AUDIO_OUTPUT"}]},"inputs":[{"rawInputs":[{"query":"tell me about cats","inputType":"VOICE"}],"arguments":[{"rawText":"tell me about cats","textValue":"tell me about cats","name":"text"}],"intent":"actions.intent.TEXT"}],"user":{"locale":"en-US","userId":"AETml1RzwqyijfbawqjZkRSXz-P1"},"device":{},"conversation":{"conversationId":"1504878811393","type":"ACTIVE","conversationToken":"[\"_actions_on_google_\",\"choose_fact-followup\"]"}}},"id":"3b97e239-346f-49a2-a106-96cfb6f69e92","timestamp":"2017-09-08T13:58:29.99Z","lang":"en","result":{"source":"agent","resolvedQuery":"tell me about cats","speech":"","action":"tell.cat.fact","actionIncomplete":false,"parameters":{},"contexts":[{"name":"_actions_on_google_","parameters":{"category.original":"headquarters","category":"headquarters","facts":{"content":{"headquarters":["Google has over 10 fitness facilities in its main campus."],"history":["Google was founded in 1998.","Google was founded by Larry Page and Sergey Brin.","Google went public in 2004.","Google has more than 70 offices in more than 40 countries."]}}},"lifespan":98},{"name":"actions_capability_audio_output","parameters":{},"lifespan":0},{"name":"google_assistant_input_type_voice","parameters":{},"lifespan":0},{"name":"choose_cats-followup","parameters":{},"lifespan":2}],"metadata":{"intentId":"14df3938-3776-477c-811c-d1758ecd15cb","webhookUsed":"true","webhookForSlotFillingUsed":"false","nluResponseTime":19,"intentName":"choose_cats"},"fulfillment":{"speech":"","messages":[{"type":0,"speech":""}]},"score":1},"status":{"code":200,"errorType":"success"},"sessionId":"1504878811393"}
Response returned to actions
{
"audioResponse": "//NExAARAA...",
"conversationToken": "CiZDIzU5Ym...",
"expectUserResponse": true,
"response": "Sorry, I didn't get any response.",
"visualResponse": {
"visualElements": []
}
}
I must be missing something. Firebase is receiving the request its just not responding correctly.
training image
That error on appears if your web hook doesn't provide a response to the assistant. The cloud function has been triggered or has timed out and not returned the JSON back to assistant to parse. Check to see what the output of the cloud function is and check it against the API.AI web hook format here https://developers.google.com/actions/reference/v1/apiai-webhook
It should look something like this:
{
"speech": "...", // ASCII characters only
"displayText": "...",
"data": {
"google": {
"expect_user_response": true,
"is_ssml": true,
"permissions_request": {
"opt_context": "...",
"permissions": [
"NAME",
"DEVICE_COARSE_LOCATION",
"DEVICE_PRECISE_LOCATION"
]
}
}
},
"contextOut": [...],
}
I think this is something on the Google's end. My application have been running on production for more than a week. Based on the logs everything was fine till 6 hours ago but since that the users don't get any answer back.
If I request on the API.AI the response is okay so it's not the firebase/fullfillment causing the issue.
Checked other applications some had the same problem some had no problem at all. Not sure what we can do here.
Errors like this are usually caused by a syntax error or other problem in your Firebase Function after you've updated it. There are a few good approaches to diagnosing problems like this:
Check the Firebase function log. If there is an error, it will almost certainly show up here.
From the command line you can use firebase functions:log to see the most recent logging messages. You can also use the console to view the logs by going to console.firebase.com, selecting the project, selecting Functions, and then the Logs tab.
If there isn't an error, it becomes more of a logic problem. Adding your own logs via console.log(), console.info(), or console.error()
Many times the logs will indicate the function is timing out after 60 seconds when you think you're returning things by then. Make sure you are completing any callbacks and calling assistant.ask() or assistant.tell() (or one of their cousins) to make sure they're being called.
After posting a question on the Google+ actions group. I got a response back from Google.
Actions Bug There is currently a bug in the Actions Platform that
might result in unexpected error messages when running your apps.
We are currently testing a fix and hope to have that rolled out soon.
As of 10 minutes ago it is working again. The code was correct all along.

Google AnalyticsAPI - This service is not available from your country

I have successfully integrated Google AnalyticsAPI few days ago.
Since monday I am receiving an 403 error, which returns "This service is not available from your country".
Production-Server details : Ditigal Ocean - Amsterdam - AMS3.
The strange thing is that my Google AnalyticsAPI integration still works properly in my test-server that have the same configuration of the production-server (Ditigal Ocean - Amsterdam - AMS3).
How can i solve it?
Thanks
Looks like an error, similar to the one described here
Google Contacts API responds with "countryBlock" error
A good place to start would be filling out the Developers Console feedback form that can be found next to "Help" button in the console toolbar.

Stop wordpress from sending out moderation emails

I'm having trouble with my wordpress installation sending out emails to the site admin
every time a comment is up for moderation.
This also goes for spam comments which results in the site admin getting alot of junk emails in his inbox.
Every time I google this problem I end up with the answer "Just go to Settings -> Discussion and unclick 'A comment is held for moderation'" but unfortunately this is not helping me.
So, here are my settings (some of these may be irrelevant):
I'm using wordpress' built in comment-system. No disqus or facebook comments.
I've installed the Akismet-plugin. I did try to disable the plugin, but I still get the emails.
Both "Anyone posts a comment" and "A comment is held for moderation" is NOT checked under "Settings" -> "Discussion" -> "E-mail me whenever" on the sites.
You do not have to be logged in to write a comment
The WP installation is originally a Wordpress MU installation, but I've upgraded to 3.x so it's now build into the regular wordpress installation. The installation run many blogs with different domain names and the problem occurs on all blogs AFAIK.
Most of the blogs are using the "Yashfa BRANDED!" theme
The moderation email looks like this:
Subject: [SITENAME] Please moderate: "Test spam comments"
Body:
A new comment on the post 78 "Test spam comments" is waiting for your approval
http://url/test-spam-comments/
Author : djqw21208ryfg23 (IP: XXX.XXX.XXX.XXX , XXX.XXX.XXX.XXX)
E-mail : fweuh3298f9wefg923g329#jkg23ru89g9werhj239r8h238t923.asdfhio
URL : http://feg239r239f9fg7329rfg322379fg23f3
Whois : http://ws.arin.net/cgi-bin/whois.pl?queryinput=XXX.XXX.XXX.XXX
Comment:
ugly spam comment goes here...
Approve it: http://url/wp-admin/comment.php?action=mac&c=XXXXX
Delete it: http://url/wp-admin/comment.php?action=cdc&c=XXXXX
Spam it: http://url/wp-admin/comment.php?action=cdc&dt=spam&c=XXXXX
Currently 0 comments are waiting for approval.
Please visit the moderation panel:
http://url/wp-admin/moderation.php
Is there a setting I've forgotten to check?
Why do I keep on getting these emails even though I've turned off the email-settings under "Settings" -> "Discussion"?
I'm having the same problem: wordpresses sending out mails. I host some wordpress blogs for other people, who sometimes drop off the planet and don't look after them any more. I do have full access to the database, so this is my method of closing wordpress down for comments and disabeling the mail:
(this assumes the default table-prefix of wp_*)
There are two options that influence the sending of mail: comments_notify and moderation_notify. I set both to false:
UPDATE wp_options SET option_value=0 WHERE option_name LIKE "%notify";
I also delete all the un-approved comments:
DELETE FROM `wp_comments` WHERE `comment_approved` = 0;
and close all the posts and pages for further comments:
UPDATE `wp_posts` SET comment_status='closed';
and then there's still the mailqueue to clean up .... :-(

Resources