Google Social Interaction Events is not reflecting in Google Analytics - ios

I have used the Google Tag Manager along with firebase to track social interaction using Google Analytics, but the data is not being tracked by Google Tag Manager.
I am getting the following error,
2019-09-17 20:31:08.813861+0530 Closet[1125:154048] GoogleTagManager error: Error executing tag 5: TypeError: cannot access property of null.
It is something to do with the Google Tag Manager container file, but I am not sure what is wrong with the container, can anyone point me out with the most possible reason for the error.

Try to export the container to another one. This could solve the problem, I read that there was an error in a change to GTM's container definition.
You should download the container file as part of your next build, but installed copies of your application should retrieve an updated container within the next 12 hours.

Related

Google Sheets Add-on error: authorisation is required to perform that action

I have an add-on that worked for years inside my domain/company until Google decided to change stuff.
I republished it and now I can run it but nobody else in the company can.
The error they receive is:
"Authorisation is required to perform that action".
I cannot pinpoint exactly where the error is because the GCP Log only tells me the function not the line, but it seems most of the times the error appears when showing a sidebar.
I do not use any kind of API, simply GAS but "just in case " I added in OAuth consent screen these scopes: .../auth/script.container.ui and .../auth/spreadsheets.
In Google Workspace Marketplace SDK OAuth Scopes I've just left the default.
Also I tried adding in appscript.json this (at top level):
"oauthScopes": [
"https://www.googleapis.com/auth/script.container.ui",
"https://www.googleapis.com/auth/script.external_request",
"https://www.googleapis.com/auth/script.scriptapp",
"https://www.googleapis.com/auth/spreadsheets",
"https://www.googleapis.com/auth/userinfo.email"
]
What else can I try ?
Update: as requested in comments here's the offending code:
// clientside
google.script.run.
withSuccessHandler()
.withFailureHandler(failureHandler) // failureHandler gets called
.aServerFunc()
//serverside
function aServerFunc(){
Logger.log('REACHED') // NO REACHED APPEARS IN CLOUD LOGS !
var docProp = PropertiesService.getDocumentProperties();
return docProp.getProperty(key)
}
So I guess the problem is nobody else but me can run google.script.run in an add-on !
Update 2:
I've removed the PropertiesService calls so it's just a blank function on the server. So it's clear that nobody but me can run google.scripts.run.
Update 3:
As required in the comments here's the procedures I did to publish the add-on:
I created a google cloud project, then configured the OAuth consentscreen (with the same scopes as appsscript.json - see above list), then in Google Workspace Marketplace SDK I've set the script ID and deployment number and the same scopes and published.
It turns out the add-on was just fine !
It's just this 4 years old bug that Google refuses to fix
If the user is logged in with multiple accounts the default one will be used.
If the default account is non-domain and the add-on is restricted to a domain the add-on will fail to authorise.

How to authenticate to Cloud Storage from a Docker app on Cloud Run

I have a Node.js app in a Docker container that I'm trying to deploy to Google Cloud Run.
I want my app to be able to read/write files from my GCS buckets that live under the same project, and I haven't been able to find much information around it.
This is what I've tried so far:
1. Hoping it works out of the box
A.k.a. initializing without credentials, like in App Engine.
const { Storage } = require('#google-cloud/storage');
// ...later in an async function
const storage = new Storage();
// This line throws the exception below
const [file] = await storage.bucket('mybucket')
.file('myfile.txt')
.download()
The last line throws this exception
{ Error: Could not refresh access token: Unsuccessful response status code. Request failed with status code 500"
at Gaxios._request (/server/node_modules/gaxios/build/src/gaxios.js:85:23)
2. Hoping it works out of the box after setting the Storage Admin IAM role to my Cloud Run service accounts.
Nope. No difference with previous.
3. Copying my credentials file as a cloudbuild.yaml step:
...
- name: 'gcr.io/cloud-builders/gsutil'
args: ['cp', 'gs://top-secret-bucket/gcloud-prod-credentials.json', '/www/gcloud-prod-credentials.json']
...
It copies the file just fine, but then the file is nor visible from my app. I'm still not sure where exactly it was copied to, but listing the /www directory from my app shows no trace of it.
4. Copy my credentials file as a Docker step
Wait, but for that I need to authenticate gsutil, and for that I need the credentials.
So...
What options do I have without uploading my credentials file to version control?
This is how I managed to make it work:
The code for initializing the client library was correct. No changes here from the original question. You don't need to load any credentials if the GCS bucket belongs to the same project as your Cloud Run service.
I learned that the service account [myprojectid]-compute#developer.gserviceaccount.com (aka "Compute Engine default service account") is the one used by default for running the Cloud Run service unless you specify a different one.
I went to the Service Accounts page and made sure that the mentioned service account was enabled (mine wasn't, this was what I was missing).
Then I went here, edited the permissions for the mentioned service account and added the Storage Object Admin role.
More information on this article: https://cloud.google.com/run/docs/securing/service-identity
I believe the correct way is to change to a custom service account that has the desired permissions. You can do this under the 'Security' tab when deploying a new revision.

Change Directus 7 API url on the Dashboard in Docker

I am trying to use Directus 7 in Docker and I have encountered the following problem:
I have not been able to change the API URL in the Dashboard (APP), no matter what I assign to the environment variable API_ENDPOINT or API_URL. Whenever I open the dashboard it tries to go to the url http://localhost:7000..../ping, and since the API is not found there, it fails.
Is there any way to change the API URL in the dashboard in Docker ? I am using the images: directus/api:latest and directus/app:latest
You can see the example i am using in: https://github.com/directus/docker/blob/master/examples/single-api/docker-compose.yml
Thank you for your help.
Try to clear the browser-cache or force a reload using shift+f5. had the same prob and it turned out, that the first time a fired up the container I forgot to set the desired endpoint. when reloading the browser did not update the locally cached .js file.

iOS Google Tag Manager integration - Can not retrieve container from network. Response: 404

I follow documentation about adding Google Tag Manager into project https://developers.google.com/tag-manager/ios/v5/. I added container folder to my project's target but I am still getting some warnings from GTM to log and it is not possible to track events to Firebase.
GoogleTagManager warning: Can not retrieve container from network. Response: 404
GoogleTagManager warning: Event emitted before runtime was initialized.
What is the proper way to initialize Tag Manager? I use my "containerName" + .json as name of the container file and add them to folder "container".
GTM iOS SDK 7.1.1
Thanks.
Referring to this link, the name of the file should be GTM-XXXXX.json. When its downloaded, it could be something like GTM-KZ4ZT31_xxxxxx.json so you just need to get rid of everything after the id, for example this GTM-KZ4ZT31_xxxxxx will become GTM-KZ4ZT31.json.
Also, double check to use the latest container file generated from the TagManager

Power BI embedded Issue

I am trying to integrate the power bi report with our asp.net mvc application. So I found this https://azure.microsoft.com/en-us/documentation/articles/power-bi-embedded-get-started-sample/ article and followed the steps. I have successfully created the workspace collection and generated the access keys. And I downloaded this https://github.com/Azure-Samples/power-bi-embedded-integrate-report-into-web-app/ sample application as specified in the article and ran the ProvisionSample contsole application. I selected the 5th step and provided the appropriate values for workspace collection name and access key and it throws the following error "Operation returned an invalid status code 'Forbidden'". I looked at the audit logs and there is no error. Anyone have idea what causes for this issue?
There is an issue going on right now that is effecting some parts of the world. We are actively working on a fix.

Resources