top of page

Posted: June 23, 2021

Updated: July 22, 2022


1. Separate URLs into their Components

To separate URLs into their components, such as for analyzing a sitemap or site structure, go to the data menu in google sheets → split text to columns, and then choose "/" as the separator. Alternatively, use the split formula.

=SPLIT(A1,“/”,true,true)

2. Users' Browser Window Widths

This is useful when creating a new landing page. Get the browser size (both width and height) in Google Analytics, and then export that data to Google Sheets to see the distribution of browser window widths. I first learned about this in a blog post from 2018, and have used it regularly. It's a bit old but still works the same: How to make a chart of your users' window sizes.


3. Ad Spend Tracker

When managing PPC campaigns, I usually setup a quick Google Sheet to track the monthly ad spend and make sure that I'm spending the budget evenly.

=DAY(TODAY())/DAY(DATE(YEAR(NOW()),MONTH(NOW())+1,0)) 

4. Regression Analysis for SEO Forecasting

Regression analysis is a common technique for understanding how a dependent variable such as organic traffic, changes in relation to independent variables such as search volume. Start with the built-in forecasting tools such as XLMiner Analysis ToolPak for Google Sheets, and then experiment with other statistical models such as multiple linear regression to see which one fits best. If you have trouble formulating a statistically significant model, try adding other important factors such as the page's publish date or number of high-quality backlinks.


5. Google Ads and Google Analytics add-ons

Google Sheets has a built-in Google Ads add-on that can pull campaign data. It's a bit buggy but good enough for ad hoc analysis. Similarly, there is also a Google Analytics add-on that you can use to pull data, modify as needed (such as fixing historical data) and export to Data Studio.


6. Identify SEO Issues

Import the html of pages in your site and checking for things like missing h1, title, meta tags, image alts, etc. Use the IMPORTXML function to scrape structured data from webpages, then use XPath query to specify which part of the XML to extract.

Some basic XPath queries:

  • //h1 - to scrape h1s

  • //title - to scrape titles

  • //@href - to scrape links

.

Other common XPath queries for SEO:

  • //meta[@name='description']/@content - to scrape meta description

  • //link[@rel=’canonical’]/@href - to scrape canonicals

.

An example for JavaScript elements:

  • //script[contains(.,'gtm.js')] - to scrape (check for) GTM code

.

7. Find & Replace with RegEx

RegEx (regular expression) is a sequence of characters to define a search pattern, often used for cleaning and manipulating data. It is available in Google Sheets find and replace, as well as many programming languages.


For example, BigQuery uses SQL and also supports RegEx as well, allowing users to write simpler code and avoid complicated subqueries.


In standard SQL, the query below extracts the substring between two parentheses.

substr (column, instr (column, '(')+1,instr (column, ')') instr(column '(')-1)

In ReGex, it can be rewritten as follows.

regex_extract (column, r'/((.*)')---

---

The remaining examples use Apps Script, which mostly runs on JavaScript 1.6, with some additions from 1.7 and 1.8. So you’ll need some JavaScript knowledge to edit the script and link it to Google properties, but not to the level of app or web development.


8. Confirmation Emails

Although Google Forms already has an option to send a standard confirmation email, Google Apps Script allows for further customization - send different confirmation emails depending on the user's responses, add external links, etc. This post by Google Workspace for Developers offers an in-depth explanation.


9. Redirect Chains

Ensure all pages on your site are accounted for with the following script.

// Get destination urls including redirects

function getRedirects(url) {
  var params = {
    'followRedirects': false,
    'muteHttpExceptions': true
  };
  var followedUrls = [url];

  while (true) {
    var res = UrlFetchApp.fetch(url, params);
    if (res.getResponseCode() < 300 || res.getResponseCode() > 399) {
      return followedUrls;
    }
    var url = res.getHeaders()['Location'];
    followedUrls.push(url);
  }
}

function getDestination(url) {
  return getRedirects(url).pop();
}

10. http Server Status Code

Track the status code of all pages on your site with the following script.

// Get http server response status code
function getStatusCode(url){
  var options = {
     'muteHttpExceptions': true,
     'followRedirects': false
   };
  var statusCode ;
  try {
  statusCode = UrlFetchApp .fetch(url) .getResponseCode() .toString() ;
  }
  
  catch( error ) {
  statusCode = error .toString() .match( / returned code (\d\d\d)\./ )[1] ;
  }

  finally {
  return statusCode ;
  }
}

// Exceed importxml limit
function importRegex(url, regexInput) { 
  var output = ''; 
  var fetchedUrl = UrlFetchApp.fetch(url, {muteHttpExceptions: true}); 
  if (fetchedUrl) { 
    var html = fetchedUrl.getContentText(); 
    if (html.length && regexInput.length) { 
      output = html.match(new RegExp(regexInput, 'i'))[1]; 
    } 
  } 
  Utilities.sleep(1000); 
  return unescapeHTML(output); 
}  

For more resources, keywords in sheets has free scripts for SEO. There are different templates for tasks such as getting old webpages from wayback machine, SEO forecasting and clustering.

Posted: May 22, 2021

Updated: July 12, 2022


If you've recently taken new ownership of a Google Ads account, or simply haven't audited your existing account in a while, this could be a good time for a check up. Regular audits can ensure that your campaigns are still running as efficiently as they were when you launched them. Even if your ROI is positive, you can always find areas for improvement.


This post explains how to audit a Google search ads account, find areas for improvement, and implement changes.


Keyword Bids

Start by checking the overall health of the account, including keyword bids. There are several metrics to use as a guide. First, the Lin-Rodnitzky (L/N) ratio, a metric introduced by a 3Q Digital, is defined as follows: divide the overall account CPA by the CPA of all keywords with at least one conversion. A ratio between 1.5-2.0 is generally good. If it's below 1.5, you might be too conservative, potentially missing out on converting keywords. If the ratio is above 2.0, you might be wasteful, over spending on non-converting keywords.


Next, check the broad match ratio. What proportion of your budget is spent on broad match keywords? Broad match tends to be less efficient than phrase or exact match, so you generally want to keep the ratio around 20%.


Finally, check specific settings in the historical data using filters. For keywords with at least 3~5 conversions, you can pretty much rely on the CPC and CPA data that was accumulated. If there are less than 3 conversions, the data is still volatile - one additional conversion could greatly affect the CPA, so keep an eye on it and make adjustments as needed.


If there any keywords that had high spend but zero conversions over several months, consider cutting your losses and stopping them. I generally use 100$ as the cutoff but it depends what is "high" for your account and business.


Once the account has accumulated several months of data, 30+ conversions monthly, and proper conversion tracking setup, consider automated bidding for maximum conversions, if that fits your business goals.


Campaign Structure

It's important to check the high-level campaign structure when you conduct a Google Ads audit. Create a custom report and check that all eligible ad groups have at least one ad, and non-dynamic ad groups have 1~20 keywords. If an ad group has too many keywords, the ads might not be targeted to user search queries, and consider splitting it up into two or more ad groups.


For most campaigns, the best practice will be to use STAGs (single theme ad groups). However, if you have a large budget (over 1k) and high conversions (30+) you can try SKAGs - single keyword ad groups. SKAGs gives you control over showing unique ads for every single keyword, but it can get complicated to maintain the campaigns and make bulk changes when needed.


Even with the new dynamic ads, Google still recommends including 1 responsive and 2 expanded text ads per ad group. Finally, use negative keywords to prevent overlapping and inner competition within your account.


Attribution Model

The default attribution model is last click, and that works fine for many businesses. However, in some cases you could be over or under reporting a campaign's performance by using the wrong attribution model. If you're spending over 10k per month or getting traffic from different sources (display campaigns, retargeting, organic traffic, etc.) one of the other available models might be a better fit. There is a model comparison tool in Google Ads so you can check.


IP Exclusion

Avoid wasting budget on clicks from employees. You can access IP exclusion settings in the left sidebar. However, with many people working from home now, IP exclusion is more complicated. In some cases it might not be worth the hassle, but you can try using a VPN, Chrome plugin, or extension.

Targeting

Targeting depends heavily on your business goals, but some common oversights across all industries include not targeting specific areas, excluding the search partner network without having data to prove poor performance, and only checking English in the language targeting settings, which limits your reach to users with English in their browser settings. If you have a decent lead nurturing pool, it may also be worth experimenting with remarketing strategies such as Customer Match.


Average CPC, CPA, and CVR

The left table shows average performance metrics across all industries, according to WordStream. This is just a benchmark, since the metrics depend on many other factors, such as your brand strength and SEO to name a few. However, it's something to keep in mind and see how you compare.


Conversion Tracking

Assuming you are already tracking your main conversion, you could gain additional insights by tracking secondary conversions. might gain insights from tracking other events as well. For example, if your primary conversion is a contact form submission, you might add page as a secondary conversion. For CPA bidding and conversion data purposes, only the primary conversion should be included in conversions.


Visit the conversions tab to confirm that everything is being properly tracked. The status should ideally be recording conversions. No recent conversions and tag inactive status doesn't mean that your tracking is broken - it could be that you simply haven't gotten any conversions in the past 7 days. New conversion events will first have an unverified status that should change once Google Ads sees an initial conversion, and you can do a manual conversion test to speed up the process.


It can take up to 24 hours for conversion data to appear in Google Ads, even when everything is working perfectly. If after 24 hours conversions still are not showing up, you might start troubleshooting. Note that if you have some conversions reported, then conversion tracking is probably set up correctly (i.e. the tracking either works or it doesn’t, in terms of setup). However, it’s still possible to have missing conversions. Here are a few things

to consider.

App Tracking Transparency (ATT)

Apple released iOS 14.5 in April 2021, which included app tracking transparency (ATT), impacting conversion tracking on iOS across many platforms including Google. Even if Google is still able to track your conversion, you can now expect up to 5 day delay in reporting. Meanwhile, you might be able to check your missing conversion in Google Analytics to see it was from paid and on mobile, which will give you a clue as to whether the problem is related to ATT.

Ad Blockers

Sometimes if the user has a third-party tool such as an ad blocker installed, it can prevent conversion tracking. According to research by Moz, ad blocker usage can be in the 15–25% range depending on region, but many of these installs will be default setups of AdBlock Plus, which does not block tracking. While you may be missing some specific conversions due to ad blockers, it shouldn’t significantly impact campaign performance. And since all advertisers suffer this problem equally, it is a level playing field across the Google network.

Auto-Tagging

If you are collecting conversion data in Google Analytics and sending it to Google Ads, you must have auto-tagging enabled. This setting is disabled by default, so you’ll need to change it in your Google Ads account settings.


Auto-tagging works by adding the gclid (Google Click Identifier) parameter to the URLs people click through from your ads. For example, if someone clicks on your ad for www.example.com, the final URL will look like www.example.com/?gclid=123xyz. Depending on what service your website is hosted on, you may need to add a bit of code either directly or via Google Tag Manager, to successfully pass gclid to your landing pages.


By default, auto-tagging overrides and manual UTM parameters that you may have set up. If you would like to have UTMs take priority, you can do that by enabling "Allow manual tagging to override Auto-Tagging" in Google Analytics, under property settings in the admin section. Google Ads will still pass any values that are not overwritten to Google Analytics, so you won’t lose the tracking details from gclid.

So what can you do about missing conversions?


Import Offline Conversions

One solution is to manually import them back into Google Ads as “offline conversions.” You can simply enter the conversion details in an Excel or Google Sheet and upload it to Google Ads. This help page has step-by-step instructions and templates. Please note that you needed to have auto-tagging enabled at the time of the conversion, because the gclid needs to be included in your upload.


Ad Extensions

There's a lot to consider when optimizing Google Ads - bid strategy, campaign structure, conversion tracking, etc. Ad extensions are often an afterthought, but they actually have a ton of benefits. Not only do they increase your SERP real estate, but they can also get you more qualified leads.


Google has directly stated that ad extensions will increase ad rank, and that extensions are favored because they allow Google to offer a better variety of ad formats and include relevant information for users. All of these factors can increase your CTR, lower your CPC, and cut costs in your ad account overall.


Google Ad extensions do exactly as the name implies - they extend your ad. Ad extensions append additional information about your business to the main body of your ad.


Sitelink Extensions

Sitelink extensions add additional links under your text ad in the SERPs. These links direct users to different pages on your site, other than the landing page.


Examples of common sitelink extensions:

  • Plans & Pricing

  • Success Stories

  • Contact Sales

  • Download Brochure

.

Callout Extensions

Callout extensions are 25-character text snippets describing the strong qualities of your services. Examples of common callout extensions:

  • Free Shipping & Delivery

  • 3 Convenient Locations

  • Free 30 Day Trial

.

Structured Snippet Extensions

Structured snippets are lists of specific services, amenities, locations, etc. Select a header from the drop down list of headers, and include at least 3 items for each one.


Lead Form Extensions

Note that your site requires a privacy policy page in order to use this extension type. Lead form extensions are a relatively new feature in Google Ads, as they were released in beta in 2019. They allow the user to fill out a form directly from the ad, without ever clicking into your website. This can be advantageous for BtoC companies looking to increase their lead pools. On the other hand, in my experience the user probably won't change their behavior just because the lead form is available. Depending on your business, it could be better to direct users to your website, where they can learn more about your offering before filling out a form.


Sitelink, callout, and structured snippet extensions are universal extensions, meaning that Google recommends every advertiser to use them. Other extension types such as call, app, lead form, etc. are more situational for each business.


Task Automation

Fortunately, Google offers many automation tools for managing your ads account efficiently. If you have custom needs that aren't covered, you can always use Google Ads Script and API to build your own tool.


Automated Rules

Google Ads has automated rules to save time and catch potential issues as soon as they occur. For example, you can receive an email notification when the CPC exceeds a certain amount, or automatically pause a campaign when the CPA exceeds a certain amount. You can also combine rules - for example, pause a campaign when the CPA exceeds $100 and the total cost is over $300. This way, the rule won't apply to new campaigns that might still be in the learning phase.


Google Ads Editor

For bulk editing, use Google Ads Editor to export your ads to Excel, make changes, and import again to publish to live. This is also useful if you require approval from a client or superior before publishing your ads. For more advanced campaign builds, you can automatically build a campaign from a spreadsheet.


Google Ads Scripts

Even if you aren't a developer, Google makes it easy to just copy and paste the whole source code to your Google Ads scripts. Some useful scripts to get started are the link checker, account anomaly detector, and ad customizer. There might be different source codes for single and manager accounts, so make sure you use the correct one for your account.


Google Data Studio

Google Data Studio is a great tool for automated reporting and sharing with your client. Obviously it's part of the G suite, so you'll get a smooth native connection to Google Ads.


If you're looking at third party tools beyond G suite, Tableau is an advanced tool similar to Data Studio, but with more powerful features for analytics.


Ads Disapproved

One of the most common reasons for disapproved ads is "destination not working," which means that the landing page can't be reached by Google's crawlers, due to some issue such as a broken link or redirect. Unfortunately ,Google does not provide the exact reason why your ad was disapproved, so you'll need to figure out the cause and solution. Here are some common possible reasons for ads disapproved due to "destination not working," and how to fix them.


Server Response Code

There are several ways to check the status code - developer tools in your browser, Google sheets, extensions, or SEO tools. Although Google does allow ad links to be redirected, too many redirects can cause slow page load speed and result in poor user experience. An http 200 response code works best. A common discrepancy is omitting www. from the destination URL, resulting in a 301 redirect to the www. subdomain. Also, note that the display URL does not need to exactly match the destination URL.


CNAME Record

Google ads can be disapproved if your landing page doesn't appear on your registered domain. This issue can arise if you are using different landing page building services. Parked domains are not allowed, and subdomains can get flagged although they are allowed. By creating a CNAME (canonical name) record, you can link your landing page to your root domain.


Accessibility

Even if your ads are only targeting a specific location, Google's policy is that your website should be universally accessible. You should have a robots.txt file granting googlebot explicit permission. A possible solution for this issue is to redirect foreign traffic to a splash page that says "this website is not available in your country."


Dynamic Tracking URLs

If you have enabled auto-tagging in Google Analytics, then Google will pass the gclid along with the URL. However, if your website can't handle URL parameters, then it can cause an error. In some cases, just enabling auto-tagging in Google Analytics was enough to get the ads approved. Although Google disapproves many ads, mistakes do happen - if you believe that your ad was mistakenly disapproved, you can try making a minor edit and resubmitting. If you still can't get the ads approved, go ahead with the appeal. Appeals usually go through within a few business days, and you can check the status in your policy manager. You can also try contacting Google Support.


Credits, Coupons, and Promo Codes

Finally, if you are running Google Ads campaigns, perhaps you were fortunate enough to receive free credits, coupons, or promo codes. The good news is that your account could be eligible for more.


Google offers free ad credits to help new users getting started, and sometimes existing users as well. If you are new to Google Ads, or haven't advertised in a while, Google will give you 100$ in ad credit after you spent 25$.


Since the COVID19 pandemic, Google also gave existing SMB advertisers up to 1,000$ in free ad credits. There was no application process - Google simply inserted the ad credits to qualifying accounts. This campaign had a few requirements, specifically, the account had to be active 10 out of 12 months in the past year to be eligible. Google also has a grant program for registered nonprofits - learn more here.


In addition ,website hosting services often offer Google Ads credits for new users of their premium plans - Bluehost, Squarespace, and Wix, just to name a few. Also, check any marketing tools and software that you are already using.

Posted: Jan 30, 2022

Updated: June 25, 2022


Note: In April 2022, Pardot was renamed to "Marketing Cloud Account Engagement." However, Pardot is not a "part of" Marketing Cloud in the sense that Pardot and Marketing Cloud function separately and are not part of the same Salesforce product architecture. The main difference is that Pardot is geared towards b2b marketing, while Marketing Cloud is better suited for b2c marketing. See this post by Salesforce Ben for a in-depth explanation of the different features.


Set up the Salesforce-Pardot Connector

First, sync Pardot and Salesforce so both your marketing and sales teams have visibility into the most recent conversion records. Only one CRM connector can be active simultaneously in Pardot, and for most clients that's Salesforce. The Pardot Integration User is an automatically provisioned user that connects to Salesforce to sync data. Pardot is the only app that can log in to Salesforce via the integration user, and only after a Salesforce admin has finished the Pardot setup.


Pardot checks for changes in Salesforce in almost real time - every two minutes to be exact. There are default activities that trigger a sync from Pardot to Salesforce, but you can override them manually or disable syncs if you'd prefer to keep some data only in Pardot. By default, Pardot creates new contacts in Salesforce as Leads, but Support can change this setting for you and enable the reverse sync feature.


Many of my clients use the Salesforce-Pardot connector (Salesforce connector), with the marketing team using Pardot to manage their pipeline, and once the leads are warm enough, moving them to Salesforce for the sales team. Connect Pardot to a Salesforce sandbox or production environment, using email as the unique identifier unless "allow multiple prospects with same email address" is enabled.


Custom objects are useful for syncing Salesforce contacts or leads to Pardot, so you can use that data in segmentation and automations. Users can create and sync a custom object from anything that is linked to a contact, lead, or account in Salesforce, to Pardot. Most fields including formula fields, dependent fields, and picklists can be synced bidirectionally in Pardot and Salesforce, but there are some exceptions such as lookups.

Sandboxes create copies of your Salesforce org in separate environments. Use them for development, testing, and training, without compromising the data and applications in your production org.

Forms and Form Handlers

Pardot forms are built and managed directly on Pardot. For example, you can build a Pardot form on a Pardot landing page.


Form handlers integrate with third-party platforms such as Wix or WordPress, and funnel the form submission data into Pardot. This is the recommended method if you need to maintain the current lead flow from an existing lead generation strategy. Regardless of whether you use Pardot forms or form handlers, the other features are still available. For example, you can create a completion action on the form to notify sales reps via email or send an autoresponder email using email template.


Completion actions allow you automatically trigger actions (assign to queue, set profile, increment prospect field value, etc.) after another action is completed - for example, when a prospect completes a form, visits a page or downloads a file. Completion actions are available within forms, form handlers, files, custom redirects, emails and page actions.


Completion action notes:

  • Completion actions are not retroactive.

  • Completion actions cannot be applied directly on a landing page.

  • Most completion actions execute every time they are triggered. However, completion actions based on email link clicks only execute once per prospect.

  • "Adjust score” completion action executes once per prospect per unique custom redirect in a 24 hour period.

  • Completion actions only execute for prospects, not visitors.

  • Completion actions don’t execute on image file downloads or on filtered activities.

  • To trigger conditional completion actions based on responses on a Pardot form - create identical form handlers for each response, and change the completion actions accordingly.


UTM Parameters in Form Submissions

There are several ways to pass UTM parameters from your PPC campaigns and landing pages, and capture them in Pardot form submissions. All of them are basically doing the same thing - add custom code to your webpage that will get the UTM parameters and submit them as hidden fields in the form.


Probably the most common method is adding the scripts directly in the body html of your webpages. You'll need to implement two scripts to get the UTM parameters from your PPC campaigns and pass them through Pardot form submissions. The first script should be added to every page, to grab the query parameter and push it into sessionStorage. The sessionStorage object stores key/value pairs in the browser, such as the following example.

sessionStorage.setItem("lastname", "Smith");
sessionStorage.getItem("lastname");

The second script should be placed only on the or page, to grab the sessionStorage value and insert a hidden field with it into the form.


Note on combining this method with auto-tagging in Google Ads. This method still works even if you are using auto-tagging to sync Google Ads and Analytics. Just make sure that UTM override is not turned on in Analytics. That way, Google Analytics will continue to prioritize auto-tagging by default, while Pardot and Salesforce will have the UTM parameters.


Other Solutions to Pass UTM Parameters to Pardot:

  • Third party tools such as Zapier

  • I also came across this github repository: Save URL Parameters

  • If your form is not in iFrame, you can also use GTM. See this comprehensive post from analytics mania. However, GTM can be blocked by some ad blockers or other third-party extensions, so using the custom JavaScript variable is not widely recommended.

.

PPC Conversion Tracking

Find the Pardot tracking code from campaigns > your campaign name > view tracking code in Pardot, and implement it on your pages. The Pardot tracking code is pretty much like any other tracking codes for analytics or paid ads - just copy and paste it into your web page html before the </body> tag. Back in Pardot, the tracking code is also useful for seeing prospect's click path through your website's content, and triggering page actions to occur when a prospect visits a certain URL.


To track where a prospect originates when they visit your website, create a custom redirect for each ad, and select a Pardot campaign for each custom redirect.


Custom redirects allow you to track when your prospects click on those pages. This can be integrated with Google Analytics parameters as well during setup. The custom redirect statistics table, located in the custom redirects tab and within the content report, is where you can find the results such as how many unique clicks the redirect has generated.


Generally, prospects are assigned to the Pardot campaign associated with their first touchpoint, and that does not change going forward. However, you can set the completion action for the custom redirect to change the campaign.

bottom of page