Ad Ops Tools Blog charles proxy

Advanced Charles Proxy Tutorial for Ad Ops

I’ve already written a variety of posts on the best way to use Charles Proxy for ad operations work, including tips on how to setup Charles for cellular debugging, each over Wi-Fi and mobile networks.  This publish is a complicated Charles Proxy tutorial, meant to spotlight greatest practices and advanced ideas once you recognize the fundamentals.  I’ve advised use instances for each that apply within the advert ops world, or that I exploit the device for specifically.

Save / Open Charles Proxy Periods

In case you’ve ever been annoyed when making an attempt to breed a technical error, with the ability to save your Charles Proxy session, send it to someone else, and have them open it on their machine to evaluation the identical difficulty is a godsend. I discover this is especially helpful if it is advisable loop in the engineering workforce’s help, or send evidence of a specific concern to a vendor’s staff.  Charles may even open periods saved in browser based mostly developer tools as properly, so you don’t essentially have to pay for a Charles license for everyone on your group to profit from this function.

charles-proxy-save-session

Multi-Session Home windows

As a greatest apply, I also attempt to document every web page load I render as a separate session, so I don’t get confused as to what occurred on what refresh cycle with my browser.  In this occasion Charles Proxy easily outpaces a browser developer software, which usually requires you to open a brand new tab if you wish to load a new session and seems to eat an enormous quantity of system assets per session.  For no matter purpose Charles is far more environment friendly in the best way it leverages RAM.

charles-proxy-multi-session

An alternative choice on this front is to leverage the Auto-Save function in Charles, which may mechanically save your session each X minutes or so.  Once Charles saves your history to a file, it clears that knowledge from the lively session, liberating up system assets.  The multi-session strategy is sensible if only need to test for a brief time period, whereas the Auto-Save function is a better choice for those who’ll be testing a lot of issues over an hour or longer.  For instance, when you have been validating an advert server migration throughout quite a lot of websites.

charles-proxy-auto-save

Repeat Advanced

This can be a great one for header bidding QA, and catching cellular app store redirects.  Let’s say you needed wanted a pattern of responses from the same companion 10, 20, 100 occasions to catch a bothersome situation that only occurred sometimes. You can for instance, make 10 requests to the same header bidder and see their common latency or a sample range of bids for your personal cookie through the use of the Repeat Advanced function in Charles Proxy.  This function duplicates prior requests and executes them nevertheless many occasions you like.

Step 1: Proper click on on a request you need to repeat and select Repeat Advanced from the menu:

advanced-repeat-charles-1

Step 2: Specify the number of occasions you need to repeat the request – the default is 10.  You can too specify concurrency, which is how many requests you need to run on the similar time, and if you wish to delay requests by any specific period of time.  Should you depart it at 1, then every request will run in sequence, one after the opposite.

advanced-repeat-charles-2

Step 3: You’ll see Charles generate your new, equivalent requests in a separate tab, where you’ll be able to evaluate them individually.

advanced-repeat-charles-3

I find it useful to know if bidding is constant or erratic for my very own consumer ID, or if I’m wanting for the advertiser making high value bids, I can iterate a number of occasions and search by means of the outcomes without having to reload the complete web page and type by means of all the other exercise.

Block Cookies

Cookies make an enormous difference on consumer expertise generally on-line, however especially in relation to advertisements since nearly all programmatic advertising is consumer targeted lately.  I’ve found that blocking cookies however allowing advertisements is usually a good way to catch low quality advertisers and regulate ad high quality rules in your trade. The rationale for this is cookie-less users are seen as low high quality visitors to most advertisers because they aren’t trackable.  This implies there’s much less competitors for this stock, making it low cost to purchase, and subsequently engaging to bottom-feeder advertisers who typically run spammy / viral ad content.  Not to mention advert operations individuals are real customers and tend to have cookies enabled, so concentrating on cookie-less users is a good way to hide from the ad high quality hunters out there.

One other great use case for this is if in case you have any frequency based mostly merchandise.  I once labored for a publisher that provided a ‘first-frequency’ roadblock product, by which the same ad would serve to any consumer on their first entry page to the location, regardless of where that was.  To check that it worked appropriately, I used this block cookies function so that I was all the time on my first pageview from the advert server’s perspective.

charles-proxy-block-cookies

It’s a good idea to solely block cookies from selected places when utilizing this function – particularly your ad tech partners – as blocking cookies out of your content material server may change the best way your website displays. More basic net builders sometimes use this software when making an attempt to view their website as an internet spider may, for occasion.

Black Listing Domains

The Black Record device in Charles Proxy lets you block requests to specific domains, and thus see how your website or software performs with out these assets involved.  You should use this device to primarily create your personal customized advert blocker on the fly, or perhaps extra useful, check how your website may carry out from a web page load perspective in case you removed a selected header bidder.  Charles also has a White Listing function in case you needed to strategy from the opposite end of the spectrum, however I find ad tech tends to have too many dependencies to get a lot use from it.

charles-proxy-blacklist

Charles Proxy Breakpoints

I almost wrote a separate publish on this function.  It’s one of many more sensible choices in Charles, and one not out there in browser-based developer instruments (at the least in the same approach).  Breakpoints let you primarily pause a webpage as it renders when the browser hits a sure type of request.  You’ll be able to then change the attributes or key values passed on that request, allowing you to test out totally different situations with out altering the code in your web page. This one will change your life as an ad ops individual!

In the directions under, I’ll show you tips on how to setup a breakpoint to cease the request to DFP so you possibly can change numerous parameters of the request before the browser executes it.  You possibly can use this to place your personal browser into numerous concentrating on segments for which you wouldn’t in any other case qualify.

Step 1: Add / enable a breakpoint by navigating to Proxy > Breakpoint Settings.  You possibly can add nevertheless many breakpoint triggers you need right here, remove these you’ve setup up to now, or even import / export breakpoint lists if you want to be really fancy.  Perhaps you’ve got a breakpoint record for all header bidders, a breakpoint listing for your ad server + DMP, and a breakpoint record for simply your ad server for numerous use instances.  You can also make these widespread throughout your whole Ad Ops workforce to scale back the technical know-how required by any single consumer, which is great for junior employees nonetheless learning how you can use the instruments.

charles proxy breakpoint list

Step 2: Once you click on ‘Add’ in the above step, you’ll be prompted with the under window where you possibly can configure the breakpoint settings by specifying when Charles should intercept the request and prompt you for motion.  For instance, there are often plenty of calls forwards and backwards with the advert server, but you may solely care concerning the initial GET request to the /gampad/advertisements endpoint as a result of that’s the one which passes the decision parameters you truly need to edit.  Equally, you may solely care concerning the request and never the response.

charles proxy configure breakppoint

Step three: Check your setup by refreshing a page you realize ought to set off your breakpoint.  If the breakpoint is triggered, Charles Proxy will routinely open a new tab referred to as ‘Breakpoints’ and listing all the requests that qualified.  On this case, we simply have a single request, as see within the left pane.  You’ll see the present particulars of the request within the Overview button, and you may edit anything you want by choosing the Edit Request button.  Simply double-click into the worth cell and change what you want.

In this case I’m just highlighting the URL parameters, however you’ll be able to see from the buttons on the very backside of the image, Charles will let you change the headers and cookies as nicely.  It’s unimaginable actually; changing the headers means you’ll be able to change your consumer agent; changing cookies means you possibly can impersonate another consumer (say another staff member that can uniquely replicate a specific drawback on your website).

charles proxy edit breakpoint

Step four: Click on the Execute button once you’ve modified what you need concerning the request and the browser will proceed with the call.  You’ll be able to validate the request was change per your instructions by going back to your Session tab, discovering the request, and navigating to its related details in the Overview tab.

Regex Filtering

This one is all about refined looking, and while it has a bit of a studying curve, it’s well worth the effort if you end up pouring by way of an extended listing of requests in each session.  For instance, for those who discover you often need to filter to a selected record of domains – say, 5 header bidder domains and your ad server – you want a ‘contains any’ search filter that a Regex filter can present.

Right here’s an example that filters on widespread header bidder’s endpoints (AOL / AppNexus / Index / PubMatic / Amazon / OpenX, respectively):

.(adtech|jpt|cygnus|gads|aax|acj).

Regex

To activate regex looking, click on the Settings button to the appropriate of the Filter box and click the checkbox that claims Filter makes use of regex proven under:

charles proxy regex filter

You possibly can study all about Regex on this information, which is likely one of the easiest explanations I’ve seen, and through the use of the superb RegExr device to check your expressions.

Did I miss something?  Inform me in the comments and check out my other posts on Charles Proxy.