Ta kontakt med oss

MARKNADSFÖRING

What The gclid?

Publicerad

what the gclid

Most of us are aware of Google Ads auto-tagging but don’t know how it works. What does auto-tagging do and why is it important in your Google Ads account?  Auto-tagging is a way for Google Ads to communicate all the details about a user session to Analytics.  In turn, we are able to use the information reported in Analytics to measure post-click behavior.

Auto-tagging is a setting in Google Ads that allows the system to append your final URLs with parameters in order to report traffic statistics into Analytics. Auto-tagging is a huge time-saver, but sometimes it breaks, creating a real challenge when trying to measure performance. Plus, whenever data is reporting inaccurately in Analytics, a considerable amount of time can be spent troubleshooting performance issues. Or worse, it can make you think your paid search traffic is not converting.

You’ll notice with auto-tagging that Google appends “gclid” to your final URLs. What does this term mean anyway? The term “gclid,” or the Google click identifier, is a way for Google Ads to communicate information about the searcher to Analytics. This data allows you to view post-click activity in Analytics, such as time spent on site, pages per visit, etc. Google Ads auto-tagging will encode the necessary tags into the URL to report on information like:

  • Källa
  • Medium
  • Campaign
  • Ad Group
  • Keyword
  • Match type
  • Ad Creative

When you enable auto-tagging in Google Ads you do not have to manually set-up tags for every URL. Whenever possible it is recommended to use auto-tagging over manual tagging to avoid mistakes. Plus, manually tagging each URL can save time and reduce errors due to capitalization or misspellings.

First, check in Google Ads to see if you have auto-tagging enabled. You can do this under ” Settings > Account Settings > Auto-tagging.”

Google Ads account settings for autotaggingAuto-tagging setting location

In these example tagged URLs, using capital vs. non-capital sources or mediums will cause Analytics to split up the data and report these as two independent statistics. This is another reason why auto-tagging is ideal over manual tagging.

Se även  Google Updates Search Console To New Item Classification System

www.website.com/?utm_source=Google&utm_medium=cpc&utm_campaign=CampaignName
www.website.com/?utm_source=google&utm_medium=cpc&utm_campaign=CampaignName

All ad clicks will now automatically append the gclid to the ad’s URL and send all associated data to Google Analytics.

There are rare times when a Google Ads account can not be connected Analytics and we need to manually tag each URL to be able to view performance data. When you create manual tags, it is important to make sure they are identical and use the same case to make sure they appear under the same line item in Analytics

Manual Tags And Reporting

Yes, case matters when you are manually tagging URLs for your campaigns. As mentioned above, you do not want Analytics splitting up your stats because you used capitalization on half of your URLs.

You will want to make sure the source, medium, and campaigns are consistently named and using the same case. I usually prefer to capitalize my campaign names because I like how it appears under “Acquisition > Campaigns > All Campaigns.” This setup is just a preference but ensures Google Analytics naming matches the naming convention in my accounts. Here’s an example.

  • Källa: google
  • Medium: cpc
  • Campaign: CampaignName (or Campaign_Name)
  • Nyckelord

If you do use capitalization on some and not others the source/medium will report separately in Analytics. You could have 2 Google Ads sources that show as such.

  • Google / cpc
  • google / cpc

This makes it harder to quickly segment traffic as you now need to filter for multiple source / medium’s to see your ad performance data.

Reasons Websites Drop The Gclid

Another issue we have found for the gclid getting dropped is when final URL redirects. A website that redirects from http://www.website.com to http://website.com may drop the gclid and you will have incorrect data reporting in Analytics. This can even happen when a HTTP URL redirects to the secure HTTPS URL. Google has a help section entitled Check if Google Ads auto-tagging works to help you ensure you are using the correct URL.

Se även  Google Business Profile View Products Search Dashboard For Merchant Center

Third-party payment options may also cause the gclid to be dropped. On an ecommerce site, you may see a referral from Paypal.com in Analytics. Thus, if someone clicks your ad and pays via PayPal, the referrer will be PayPal instead of Google Ads.

PayPal referral example

Troubleshooting The Gclid Issue

Unfortunately, auto-tagging settings and Gclid dropping off is a somewhat common tracking error. If you have a high volume of ads it can be tricky to make sure these are set-up properly. Every website is different, and server settings may change tracking behavior. In order for auto-tagging to work properly, you will need to make sure the Google Ads final URL and the website URLs match up.

In one case, we had a client who had all the ads pointed to http://www.website.com instead of the https:// version. Display traffic was reporting terrible metrics when it was really the URL issue causing the gclid to drop. Since we corrected the final URL, display is one of the best performing campaigns.

In another case, some of the URLs were set up with the WWW and some were not, preventing Analytics from reporting revenue associated with Paid Search. Analytics was reporting most transactions as direct traffic.

Checking The gclid In Analytics

So how do you know if you have a mismatch or if you have an issue with gclid parameters? Analytics is a good place to start.  You might see a notification error that says ‘Invalid Google Ads gclid’ that will give you additional details into what is happening.

Invalid AdWords gclidInvalid gclid

Analytics may also show you a notification error stating there are clicks and sessions discrepancies.

Se även  IAB Tech Lab prepares digital media industry for ‘watershed moment’

Clicks and Sessions DiscrepanciesTraffic discrepancies

You can also view the clicks vs sessions data under “Acquisition > Ads > Campaigns.”

google analytics adwords clicks sessionsGoogle Ads metrics in Google Analytics

In the example above, you can see the clicks and sessions have a significant discrepancy in their data. Keep in mind, these numbers will never match up exactly, but there shouldn’t be this big of a difference in the data.

You can view all conversion paths under “Conversions > Multi-Channel Funnels > Top Conversion Paths.”

assisted conversions pathsMulti-channel funnels

As you can see in the above example, many of our conversions are falling under direct traffic, which may be because the URL is dropping the gclid.

Next, you can visit the Google support page. Open a new window in Chrome and select “Menu > More Tools > Developer Tools” and select the Network tag. In the address bar, set up your URL like the example provided and select enter http://www.example.com/?parameter=1&gclid=TeSter-123. After the page finishes loading, you should still see the gclid in the address bar or the header. If you do not see it at all that means your website is dropping the gclid and you’ll need to work with the web team on why.

Also, keep in mind that when you add your website in the address bar and if you see a status of 302, this status means your website has a redirect and auto-tagging may not work. Make sure you follow the redirect and see the tag carried over.

google chrome redirect auto-tagging gclidA 302 status

We hope this article will help you understand how auto-tagging actually functions, the differences between auto-tagging and manual tagging and how these features can impact your Analytics data. We have also included some additional resources below to help you verify if your auto-tagging is working and additional reasons why it may not be.

Författare:
Post updated by Jacob Fairclough (prior post date: 06/01/16)

PPChero.com

Håll ett öga på vad vi gör
Bli först med att få de senaste uppdateringarna och exklusivt innehåll direkt till din e-postinkorg.
Vi lovar att inte spamma dig. Du kan avbryta prenumerationen när som helst.
Ogiltig e-postadress

MARKNADSFÖRING

The Moz Links API: An Introduction

Publicerad

The Moz Links API: An Introduction

What exactly IS an API? They’re those things that you copy and paste long strange codes into Screaming Frog for links data on a Site Crawl, right?

I’m here to tell you there’s so much more to them than that – if you’re willing to take just a few little steps. But first, some basics.

What’s an API?

API stands for “application programming interface”, and it’s just the way of… using a thing. Everything has an API. The web is a giant API that takes URLs as input and returns pages.

But special data services like the Moz Links API have their own set of rules. These rules vary from service to service and can be a major stumbling block for people taking the next step.

When Screaming Frog gives you the extra links columns in a crawl, it’s using the Moz Links API, but you can have this capability anywhere. For example, all that tedious manual stuff you do in spreadsheet environments can be automated from data-pull to formatting and emailing a report.

If you take this next step, you can be more efficient than your competitors, designing and delivering your own SEO services instead of relying upon, paying for, and being limited by the next proprietary product integration.

GET vs. POST

Most APIs you’ll encounter use the same data transport mechanism as the web. That means there’s a URL involved just like a website. Don’t get scared! It’s easier than you think. In many ways, using an API is just like using a website.

As with loading web pages, the request may be in one of two places: the URL itself, or in the body of the request. The URL is called the “endpoint” and the often invisibly submitted extra part of the request is called the “payload” or “data”. When the data is in the URL, it’s called a “query string” and indicates the “GET” method is used. You see this all the time when you search:

https://www.google.com/search?q=moz+links+api <-- GET method 

When the data of the request is hidden, it’s called a “POST” request. You see this when you submit a form on the web and the submitted data does not show on the URL. When you hit the back button after such a POST, browsers usually warn you against double-submits. The reason the POST method is often used is that you can fit a lot more in the request using the POST method than the GET method. URLs would get very long otherwise. The Moz Links API uses the POST method.

Making requests

A web browser is what traditionally makes requests of websites for web pages. The browser is a type of software known as a client. Clients are what make requests of services. More than just browsers can make requests. The ability to make client web requests is often built into programming languages like Python, or can be broken out as a standalone tool. The most popular tools for making requests outside a browser are curl och wget.

We are discussing Python here. Python has a built-in library called URLLIB, but it’s designed to handle so many different types of requests that it’s a bit of a pain to use. There are other libraries that are more specialized for making requests of APIs. The most popular for Python is called requests. It’s so popular that it’s used for almost every Python API tutorial you’ll find on the web. So I will use it too. This is what “hitting” the Moz Links API looks like:

response = requests.post(endpoint, data=json_string, auth=auth_tuple)

Given that everything was set up correctly (more on that soon), this will produce the following output:

{'next_token': 'JYkQVg4s9ak8iRBWDiz1qTyguYswnj035nqrQ1oIbW96IGJsb2dZgGzDeAM7Rw==',
 'results': [{'anchor_text': 'moz',
              'external_pages': 7162,
              'external_root_domains': 2026}]}

This is JSON data. It’s contained within the response object that was returned from the API. It’s not on the drive or in a file. It’s in memory. So long as it’s in memory, you can do stuff with it (often just saving it to a file).

Se även  How To Use Paid Search & Social Ads For Promoting Events

If you wanted to grab a piece of data within such a response, you could refer to it like this:

response['results'][0]['external_pages']

This says: “Give me the first item in the results list, and then give me the external_pages value from that item.” The result would be 7162.

NOTE: If you’re actually following along executing code, the above line won’t work alone. There’s a certain amount of setup we’ll do shortly, including installing the requests library and setting up a few variables. But this is the basic idea.

JSON

JSON stands for JavaScript Object Notation. It’s a way of representing data in a way that’s easy for humans to read and write. It’s also easy for computers to read and write. It’s a very common data format for APIs that has somewhat taken over the world since the older ways were too difficult for most people to use. Some people might call this part of the “restful” API movement, but the much more difficult XML format is also considered “restful” and everyone seems to have their own interpretation. Consequently, I find it best to just focus on JSON and how it gets in and out of Python.

Python dictionaries

I lied to you. I said that the data structure you were looking at above was JSON. Technically it’s really a Python dictionary or dict datatype object. It’s a special kind of object in Python that’s designed to hold key/value pairs. The keys are strings and the values can be any type of object. The keys are like the column names in a spreadsheet. The values are like the cells in the spreadsheet. In this way, you can think of a Python dict as a JSON object. For example here’s creating a dict in Python:

my_dict = {
    "name": "Mike",
    "age": 52,
    "city": "New York"
}

And here is the equivalent in JavaScript:

var my_json = {
    "name": "Mike",
    "age": 52,
    "city": "New York"
}

Pretty much the same thing, right? Look closely. Key-names and string values get double-quotes. Numbers don’t. These rules apply consistently between JSON and Python dicts. So as you might imagine, it’s easy for JSON data to flow in and out of Python. This is a great gift that has made modern API-work highly accessible to the beginner through a tool that has revolutionized the field of data science and is making inroads into marketing, Jupyter Notebooks.

Flattening data

But beware! As data flows between systems, it’s not uncommon for the data to subtly change. For example, the JSON data above might be converted to a string. Strings might look exactly like JSON, but they’re not. They’re just a bunch of characters. Sometimes you’ll hear it called “serializing”, or “flattening”. It’s a subtle point, but worth understanding as it will help with one of the largest stumbling blocks with the Moz Links (and most JSON) APIs.

Objects have APIs

Actual JSON eller dict objects have their own little APIs for accessing the data inside of them. The ability to use these JSON and dict APIs goes away when the data is flattened into a string, but it will travel between systems more easily, and when it arrives at the other end, it will be “deserialized” and the API will come back on the other system.

Data flowing between systems

This is the concept of portable, interoperable data. Back when it was called Electronic Data Interchange (or EDI), it was a very big deal. Then along came the web and then XML and then JSON and now it’s just a normal part of doing business.

Se även  Uppdatera och rotera dina annonsmaterial med Uzair Kharawala [VIDEO]

If you’re in Python and you want to convert a dict to a flattened JSON string, you do the following:

import json

my_dict = {
    "name": "Mike",
    "age": 52,
    "city": "New York"
}

json_string = json.dumps(my_dict)

…which would produce the following output:

'{"name": "Mike", "age": 52, "city": "New York"}'

This looks almost the same as the original dict, but if you look closely you can see that single-quotes are used around the entire thing. Another obvious difference is that you can line-wrap real structured data for readability without any ill effect. You can’t do it so easily with strings. That’s why it’s presented all on one line in the above snippet.

Such stringifying processes are done when passing data between different systems because they are not always compatible. Normal text strings on the other hand are compatible with almost everything and can be passed on web-requests with ease. Such flattened strings of JSON data are frequently referred to as the request.

Anatomy of a request

Again, here’s the example request we made above:

response = requests.post(endpoint, data=json_string, auth=auth_tuple)

Now that you understand what the variable name json_string is telling you about its contents, you shouldn’t be surprised to see this is how we populate that variable:

 data_dict = {
    "target": "moz.com/blog",
    "scope": "page",
    "limit": 1
}

json_string = json.dumps(data_dict)

…and the contents of json_string looks like this:

'{"target": "moz.com/blog", "scope": "page", "limit": 1}'

This is one of my key discoveries in learning the Moz Links API. This is in common with countless other APIs out there but trips me up every time because it’s so much more convenient to work with structured dicts than flattened strings. However, most APIs expect the data to be a string for portability between systems, so we have to convert it at the last moment before the actual API-call occurs.

Pythonic loads and dumps

Now you may be wondering in that above example, what a dump is doing in the middle of the code. The json.dumps() function is called a “dumper” because it takes a Python object and dumps it into a string. The json.loads() function is called a “loader” because it takes a string and loads it into a Python object.

The reason for what appear to be singular and plural options are actually binary and string options. If your data is binary, you use json.load() och json.dump(). If your data is a string, you use json.loads() och json.dumps(). The s stands for string. Leaving the s off means binary.

Don’t let anybody tell you Python is perfect. It’s just that its rough edges are not excessively objectionable.

Assignment vs. equality

For those of you completely new to Python or programming in general, what we’re doing when we hit the API is called an assignment. The result of requests.post() is being assigned to the variable named response.

response = requests.post(endpoint, data=json_string, auth=auth_tuple)

We are using the = sign to assign the value of the right side of the equation to the variable on the left side of the equation. The variable response is now a reference to the object that was returned from the API. Assignment is different from equality. The == sign is used for equality.

# This is assignment:
a = 1  # a is now equal to 1

# This is equality:
a == 1  # True, but relies that the above line has been executed

The POST method

response = requests.post(endpoint, data=json_string, auth=auth_tuple)

De requests library has a function called post() that takes 3 arguments. The first argument is the URL of the endpoint. The second argument is the data to send to the endpoint. The third argument is the authentication information to send to the endpoint.

Se även  En kraftfull renrumslösning [Uppdaterad]

Keyword parameters and their arguments

You may notice that some of the arguments to the post() function have names. Names are set equal to values using the = sign. Here’s how Python functions get defined. The first argument is positional both because it comes first and also because there’s no keyword. Keyworded arguments come after position-dependent arguments. Trust me, it all makes sense after a while. We all start to think like Guido van Rossum.

def arbitrary_function(argument1, name=argument2):
    # do stuff

The name in the above example is called a “keyword” and the values that come in on those locations are called “arguments”. Now arguments are assigned to variable names right in the function definition, so you can refer to either argument1 or argument2 anywhere inside this function. If you’d like to learn more about the rules of Python functions, you can read about them här.

Setting up the request

Okay, so let’s let you do everything necessary for that success assured moment. We’ve been showing the basic request:

response = requests.post(endpoint, data=json_string, auth=auth_tuple)

…but we haven’t shown everything that goes into it. Let’s do that now. If you’re following along and don’t have the requests library installed, you can do so with the following command from the same terminal environment from which you run Python:

pip install requests

Often times Jupyter will have the requests library installed already, but in case it doesn’t, you can install it with the following command from inside a Notebook cell:

!pip install requests

And now we can put it all together. There’s only a few things here that are new. The most important is how we’re taking 2 different variables and combining them into a single variable called AUTH_TUPLE. You will have to get your own ACCESSID and SECRETKEY from the Moz.com website.

The API expects these two values to be passed as a Python data structure called a tuple. A tuple is a list of values that don’t change. I find it interesting that requests.post() expects flattened strings for the data parameter, but expects a tuple for the auth parameter. I suppose it makes sense, but these are the subtle things to understand when working with APIs.

Here’s the full code:

import json
import pprint
import requests

# Set Constants
ACCESSID = "mozscape-1234567890"  # Replace with your access ID
SECRETKEY = "1234567890abcdef1234567890abcdef"  # Replace with your secret key
AUTH_TUPLE = (ACCESSID, SECRETKEY)

# Set Variables
endpoint = "https://lsapi.seomoz.com/v2/anchor_text"
data_dict = {"target": "moz.com/blog", "scope": "page", "limit": 1}
json_string = json.dumps(data_dict)

# Make the Request
response = requests.post(endpoint, data=json_string, auth=AUTH_TUPLE)

# Print the Response
pprint(response.json())

…which outputs:

{'next_token': 'JYkQVg4s9ak8iRBWDiz1qTyguYswnj035nqrQ1oIbW96IGJsb2dZgGzDeAM7Rw==',
 'results': [{'anchor_text': 'moz',
              'external_pages': 7162,
              'external_root_domains': 2026}]}

Using all upper case for the AUTH_TUPLE variable is a convention many use in Python to indicate that the variable is a constant. It’s not a requirement, but it’s a good idea to follow conventions when you can.

You may notice that I didn’t use all uppercase for the endpoint variable. That’s because the anchor_text endpoint is not a constant. There are a number of different endpoints that can take its place depending on what sort of lookup we wanted to do. The choices are:

  1. anchor_text

  2. final_redirect

  3. global_top_pages

  4. global_top_root_domains

  5. index_metadata

  6. link_intersect

  7. link_status

  8. linking_root_domains

  9. länkar

  10. top_pages

  11. url_metrics

  12. usage_data

And that leads into the Jupyter Notebook that I prepared on this topic located here on Github. With this Notebook you can extend the example I gave here to any of the 12 available endpoints to create a variety of useful deliverables, which will be the subject of articles to follow.

Källlänk

Håll ett öga på vad vi gör
Bli först med att få de senaste uppdateringarna och exklusivt innehåll direkt till din e-postinkorg.
Vi lovar att inte spamma dig. Du kan avbryta prenumerationen när som helst.
Ogiltig e-postadress
Fortsätt läsa

MARKNADSFÖRING

Vad företag får fel om innehållsmarknadsföring 2023 [Experttips]

Publicerad

Vad företag får fel om innehållsmarknadsföring 2023 [Experttips]

The promise of inbound marketing is a lure that attracts businesses of all kinds, but few understand the efforts it takes to be successful. After a few blog posts, they flame out and grumble “We tried content marketing, but it didn’t really work for us.” I hear this from prospective clients all the time.

(mer …)

Se även  How To Use Paid Search & Social Ads For Promoting Events
Håll ett öga på vad vi gör
Bli först med att få de senaste uppdateringarna och exklusivt innehåll direkt till din e-postinkorg.
Vi lovar att inte spamma dig. Du kan avbryta prenumerationen när som helst.
Ogiltig e-postadress
Fortsätt läsa

MARKNADSFÖRING

Oracle subtraherar socialt delningsverktyg AddThis

Publicerad

Oracle subtraherar socialt delningsverktyg AddThis

Oracle has removed social sharing and insights tool AddThis from its marketing cloud services. Customers who used AddThis widgets on their sites, enabling visitors to share content on social platforms, have seen the tools disappear with little warning.

A company notice provided by Oracle said that it had planned to terminate all AddThis services, effective May 31. The termination was “part of a periodic product portfolio review,” the statement read.

Oracle acquired AddThis in 2016.

Varför vi bryr oss. AddThis was a popular tool for upwards of 15 million publishers. Not only did it allow web visitors to easily share content on social, it also provided analytics to publishers via dashboard and weekly reports.

What’s next. Oracle provided the following steps for AddThis users in their notice:

  • The user must immediately cease its use of AddThis services, and promptly remove all AddThis related code and technology from its websites;
  • AddThis buttons may disappear from the user’s websites;
  • The AddThis dashboard associated with the user’s registration for AddThis, and all support for AddThis services, will no longer be available;
  • All features of AddThis configured to interoperate with user’s websites, any other Oracle services, or any third-party tools and plug-ins will no longer function.

Gräv djupare: Marketers need a unified platform, not more standalone tools

2023 Ersättningsundersökning Liten

Se även  Google Updates Search Console To New Item Classification System

Skaffa MarTech! Dagligen. Fri. I din inkorg.



Om författaren

Chris Wood

Chris Wood draws on over 15 years of reporting experience as a B2B editor and journalist. At DMN, he served as associate editor, offering original analysis on the evolving marketing tech landscape. He has interviewed leaders in tech and policy, from Canva CEO Melanie Perkins, to former Cisco CEO John Chambers, and Vivek Kundra, appointed by Barack Obama as the country’s first federal CIO. He is especially interested in how new technologies, including voice and blockchain, are disrupting the marketing world as we know it. In 2019, he moderated a panel on “innovation theater” at Fintech Inn, in Vilnius. In addition to his marketing-focused reporting in industry trades like Robotics Trends, Modern Brewery Age and AdNation News, Wood has also written for KIRKUS, and contributes fiction, criticism and poetry to several leading book blogs. He studied English at Fairfield University, and was born in Springfield, Massachusetts. He lives in New York.

Källlänk

Håll ett öga på vad vi gör
Bli först med att få de senaste uppdateringarna och exklusivt innehåll direkt till din e-postinkorg.
Vi lovar att inte spamma dig. Du kan avbryta prenumerationen när som helst.
Ogiltig e-postadress
Fortsätt läsa

Trendigt

sv_SESvenska