I've connected Google Search Console as a data source and added a New Field called "Brand or Non-brand".
The "Brand or Non-brand" field take the Google Search Console "Query" dimension as a variable. The field uses a CASE statement to determine if the query includes a brand term like "Pepsi" or a non brand term like "Fizzy Drinks." This bit all works without error. See this example;
CASE
WHEN REGEXP_MATCH(Query, ".*pepsi.*") THEN "Brand"
ELSE "Non-brand"
END
I want to know if I can use a Google Sheet to store the various brand terms? The Google Sheet would be a new data source and would have a column called "brand terms." This would include things like Pepsi, Coke, Fanta, Dr Pepper.
I connected the data sources but I couldn't get the fields to appear in the other data source. For example "brand terms" wont appear in the CASE statement in the Search Console Data source. I experimented with blending the data, but was unsuccessful.
I guess it's going to look a bit like this;
CASE
WHEN REGEXP_MATCH(Query, GoogleSheet_BrandTerms) THEN "Brand"
ELSE "Non-brand"
END
Would anybody have any advice?
Related
I'm trying to pull historical pricing data from CoinGecko's free API to use in a Google Sheet. It presents OHLC numbers in the following format:
[
[1589155200000,0.05129,0.05129,0.047632,0.047632],
[1589500800000,0.047784,0.052329,0.047784,0.052329],
[1589846400000,0.049656,0.053302,0.049656,0.053302],
...
]
As you can see, this isn't typical JSON format since there are no property names. So that everyone is on the same page, for this data the properties of each subarray in order are Time (in UNIX epoch format), Open Price, High Price, Low Price, and Close Price.
I'm using the ImportJSON code found here to try and pull this data, but it does not work. Instead of putting each subarray into a separate row, split into columns for the 5 properties, it prints everything out into a single cell like so:
1589155200000,0.05129,0.05129,0.047632,0.047632,1589500800000,0.047784,0.052329,0.047784,0.052329,15898 6400000,0.049656,0.053302,0.049656,0.053302,...
This is incredibly unhelpful. I'm trying to avoid using a paid API add-on since I really don't want to have to pay the frankly exorbitant fees they want to charge, but I can't figure out a way to get ImportJSON to play nicely with this data. Does anyone know of a solution?
It's simplier : your datas are in an array structure : I put
[
[1589155200000,0.05129,0.05129,0.047632,0.047632],
[1589500800000,0.047784,0.052329,0.047784,0.052329],
[1589846400000,0.049656,0.053302,0.049656,0.053302]
]
in A1, and I get the individual values by this simplier way :
function myArray(){
var f = SpreadsheetApp.getActiveSheet();
var result = eval(f.getRange('A1').getValue());
f.getRange(2,1,result.length,result[0].length).setValues(result)
}
I'm trying to filter my campaign data on GDS in two steps:
Step 1: Filter out just my Search campaigns
Step 2: Within Search, split campaigns into 'Brand', 'Dynamic Search' and 'Generic'
I've been able to do Step 2 using CASE, as follows:
CASE
WHEN REGEXP_MATCH(Campaign, '.*(Brand).*') THEN 'Brand'
WHEN REGEXP_MATCH(Campaign, '.*(Generic).*') THEN 'Generic'
WHEN REGEXP_MATCH(Campaign, '.*(DSA).*') THEN 'Dynamic Search'
END
While this serves to separate out my Brand, Generic and Dynamic Search campaigns, I still have another row called 'null' that shows metrics from a bunch of other campaigns - Shopping, Display, Video, etc. Attaching a screengrab as well.
So my question is, how do I apply two layers of filters, so GDS first narrows the campaigns down to Search only, so I can then get campaign metrics split by Brand, Generic and DSA?
Thanks in advance!
Okay so I've found a way around this by using CASE to bucket campaigns into Brand, Generic and DSA, and then adding a regular filter from the 'Data' section. I'd still like to know if applying two filters is doable using CASE.
I am trying to use Microsoft Graph to capture the products which we have licenses for.
While I can get the skupartname, that name is not exactly display-friendly.
I have come across DisplayName as a datapoint in almost all the API calls that give out an object with an id.
I was wondering if there was a DisplayName for the skus, and where I could go to get them via the graph.
For reference, the call I made was on the https://graph.microsoft.com/v1.0/subscribedSkus endpoint following the doc https://learn.microsoft.com/en-us/graph/api/subscribedsku-list?view=graph-rest-1.0
The following is what's returned (after filtering out things I don't need), and as mentioned before, while I have a unique identifier which I can use via the skuPartNumber, that is not exactly PRESENTABLE.
You might notice for some of the skus, it difficult to figure out what it is referring to based on the names in the image of the Licenses page posted after the output
[
{
"capabilityStatus": "Enabled",
"consumedUnits": 0,
"id": "aca06701-ea7e-42b5-81e7-6ecaee2811ad_2b9c8e7c-319c-43a2-a2a0-48c5c6161de7",
"skuId": "2b9c8e7c-319c-43a2-a2a0-48c5c6161de7",
"skuPartNumber": "AAD_BASIC"
},
{
"capabilityStatus": "Enabled",
"consumedUnits": 0,
"id": "aca06701-ea7e-42b5-81e7-6ecaee2811ad_df845ce7-05f9-4894-b5f2-11bbfbcfd2b6",
"skuId": "df845ce7-05f9-4894-b5f2-11bbfbcfd2b6",
"skuPartNumber": "ADALLOM_STANDALONE"
},
{
"capabilityStatus": "Enabled",
"consumedUnits": 96,
"id": "aca06701-ea7e-42b5-81e7-6ecaee2811ad_0c266dff-15dd-4b49-8397-2bb16070ed52",
"skuId": "0c266dff-15dd-4b49-8397-2bb16070ed52",
"skuPartNumber": "MCOMEETADV"
}
]
Edit:
I am aware that I can get "friendly names" of SKUs in the following link
https://learn.microsoft.com/en-us/azure/active-directory/users-groups-roles/licensing-service-plan-reference
The problem is that it contains ONLY the 70ish most COMMON SKUs (in the last financial quarter), NOT ALL.
My organization alone has 5 SKUs not present on that page, and some of our clients for who we are an MSP for, also have a few. In that context, the link really does not solve the problem, since it is not reliable, nor updated fast enough for new SKUs
You can see a match list from Product names and service plan identifiers for licensing.
Please note that:
the table lists the most commonly used Microsoft online service
products and provides their various ID values. These tables are for
reference purposes and are accurate only as of the date when this
article was last updated. Microsoft does not plan to update them for
newly added services periodically.
Here is an extra list which may be helpful.
There is a CSV download available of the data on the "Product names and service plan identifiers for licensing" page now.
For example, the current CSV (as of the time of posting this answer) is located at https://download.microsoft.com/download/e/3/e/e3e9faf2-f28b-490a-9ada-c6089a1fc5b0/Product%20names%20and%20service%20plan%20identifiers%20for%20licensing%20v9_22_2021.csv. This can be downloaded, cached and parsed in your application to resolve the product display name.
This is just a CSV format of the same table that is displayed on the webpage, which is not comprehensive, but it should have many of the products listed. If you find one that is missing, you can use the "Submit feedback for this page" button on the bottom of the page to create a GitHub issue. The documentation team usually responds in a few weeks.
Microsoft may provide an API for this data in the future, but it's only in their backlog. (source)
Used this code to create a custom channel grouping but it includes an extra dimension that is not named but has data valued on the time series
I have tried to edit the code and reenter it but the extra dimension still remains and because it is not named I cannot figure out how to eliminate it
CASE
WHEN ((Source="direct" AND Medium="(not set)") OR Medium="(none)") THEN "Direct"
WHEN Medium="organic" THEN "Organic Search"
WHEN Medium="referral" THEN "Referral"
WHEN REGEXP_MATCH(Medium,"^(cpc|ppc|paidsearch)$") AND Ad Distribution Network!="Content" THEN "Paid Search"
END
I expect to see Direct, Organic search, referral and Paid search as the only data values on my time series but I have all those appear and then another set of data values show up on the time series and in the legend but this dimension is unnamed and I am not sure where the code is wrong
I'm not sure why you're getting the extra dimension but you could add the else statement below and then use a filter to remove the "Delete" dimension
CASE
WHEN ((Source="direct" AND Medium="(not set)") OR Medium="(none)") THEN "Direct"
WHEN Medium="organic" THEN "Organic Search"
WHEN Medium="referral" THEN "Referral"
WHEN REGEXP_MATCH(Medium,"^(cpc|ppc|paidsearch)$") AND Ad Distribution Network!="Content"
THEN "Paid Search"
ELSE "Delete"
END
I wonder if this is showing up as blank because it's traffic that doesn't have a utm tag? That should show up as (not set) but you never know. If you pull the channel into a table along with full referrer, is there anything distinguishing the blank ones from the others, so you know how to categorize it, then you can add anything blank to a specific channel?
How can I find "id" of above web table, if I only know name of a particular customer. For example from the above table how can I find "CUSTOMER ID" of "THOMAS HANDY".
The code you are looking for looks similar this (Note this is written in Ruby)
if(tab['class'].include?(var))
tab is a selector variable.
var would be what you want it to have.
So something like the following...
#Logic to Loop through each table - Parameterising it as table
if(table.text.include?('Thomas Hardy'))
table['id']
end
#End of Loop Logic
Although as people have said, you're missing lots of info