7 – How to send metric data to Google Analytics when a PDF is associated with multiple subsites

we use Drupal 7 with Google Analytics and Google Tag Manager.

We have an interesting setup for our site that has a content type called “Public Resource” each of which will have a PDF associated with it.

Each “Public Resource” can be tagged with multiple tags such as: “Coal”, “Plastic”, “Climate”.

We want an individual Google Analytics report for “Coal”, an individual Google Analytics report for “Plastic” and an individual Google Analytics report for “Climate”.

If someone clicks on the “Public Resource” node then Google Tag Manager looks at the DOM for the page and sends an event to GA for the “Coal” report. If Plastic is also tagged on the page it sends an even to GA for the “Plastic” report, and the same deal for Climate.

This sends us good metric data but not if someone from outside our site gets the link to the PDF directly. If they do this then they don’t visit the “Public Resource” node and we don’t get our Google Tag Manager data that we want for our Coal, Plastic, and Climate Google Analytics reports.

What we would want is if someone had a direct link to the PDF we would like some way for Google Tag Manager to be able to know that the PDF was associated with the “Public Resource” node and the proper events sent out to Google Analytics for our “Plastic”, “Coal”, and “Climate” GA reports.

I can’t see a way to do this but I’m hoping someone has an idea.

Google Sheets, multiple sheets, different rows

First, I apologize if my use of quotations and such are not correct. I will try my best to explain my situation and I appreciate any help provided.

I have one Workbook with multiple sheets.

Sheets are titled, “This Month” “Last Month” and “Compiled Data”.

The rows of data on “This Month” and “Last Month!” do not match.

For example on “This Month” the information in Row 26 (1420576) does not appear at all on “Last Month”
Sometimes the reverse is true. The information is on “Last Month” and not on “This Month”. For example, Row 68(1608785) is on “Last Month” but not “This Month”.

I need to add the information from Column O from “This Month” to the information from Column O on “Last Month” and I want that information to insert into Column H on the “Compiled Data” sheet.

I have tried to use =sum(‘This Month’!$O$2)+(‘Last Month’!$O$2) but that doesn’t account for the information that is different between the rows from each sheet.

How can I use a formula or something to complete this task without manually comparing each row?

Here is an example sheet to reference.

https://docs.google.com/spreadsheets/d/1cNBYkZbWAkhnqpUfr4Attkyy-ThAylsJFVnP-kSh5F4/edit?usp=sharing

multiple exposure – How did film photographers deal with issues around dynamic range?

The limitations one worked with and the techniques for getting around those limitations (when that was possible at all) differed considerably depending on the scene you were trying to capture as well as on the film you were using.

Graduated and split neutral density filters were part of the game, certainly, but they were only the beginning. But understand that that “beginning” could extend, in the case of a landscape photographer using a large-format (8×10 or larger) camera and colour transparency film, all the way to creating a custom cut-out ND gel (created by tracing the image on the camera’s ground glass), which would be stuck to a plate and used in a compendium lens shade (sometimes called a “matte box”) in front of the lens. Mind you, those were the obsessive types who created images for the calendar, jigsaw puzzle and coffee table book markets — they tend to make a dozen or two spectacular pictures each year by showing up at the same location for weeks on end, waiting for everything to be exactly right, and going home without taking a picture more often than not.

In the very beginning, there was image compositing — something we of the Photoshop generation tend to take for granted, and tend to assume is a new thing. (If we understand that it was done in the past, we tend to think of it as special-effects trickery, or in terms of surreal images like those created by Jerry Uelsmann.) The fact of the matter is that it as almost necessary in the early days, since the plates or paper negatives were sensitive only to blue light. Because exposure for things other than the sky depended on capturing whatever minuscule amounts of blue light were reflected by non-blue things, one couldn’t actually create an image that had both sky and ground detail. If the plate had a sensitivity that was equivalent, say, to ISO 1 for things terrestrial, it also had a sensitivity equivalent to ISO 64 for the daylight sky, which would put the sky somewhere around 8 stops brighter than the midtones of the landscape at the best of times. So you had a choice: white skies, or separate exposures. (And if you’re going to do separate exposures, why not just have a stock library of pretty and dramatic skies on hand, eh?)

Orthochromatic film (sensitive to violet, blue, green and into the yellows) lessened, but did not solve, the sky problem. When panchromatic B&W film (sensitive across the visual spectrum) came along, the nature of the problem changed completely. One no longer had to accept losing the sky altogether as “just thee way things are” since it became possible to capture the sky and the ground in the same exposure. And that, more than anything else, put the notion of image compositing on the back-burner in most minds.

With B&W pan film, your choices are almost unlimited. If the too-bright areas of your image can be isolated by colour (like a blue sky), then you can use one of the band-block filters to selectively tone down that portion of the spectrum. That’s why people used filters like the K2, #25 and #29 filters — they all block short-wavelength (blue & violet) light to varying degrees, which could provide anything from a detailed-but-plausible sky to something really dramatic. (The K2 could almost be considered a contrast-correction filter.) You could also use a split or graduated neutral density filter (or a split colour filter, depending on the effect you wanted to achieve).

The biggest tool in the arsenal, though, was contrast manipulation in development. Developing for a shorter period of time results in a thin, low-contrast negative, and developing longer results in a dense, high-contrast negative. With a “proper” exposure, either will ruin the picture. But if you deliberately overexpose the negative and then under-develop, you end up with a negative that has normal density and lower-than-normal contrast. (Similarly, if you under-expose and over-develop, you get a normal-density negative with very high contrast.) With this knowledge in hand, you can quickly get to a rule of thumb that says: expose for the shadows and develop for the highlights. That requires metering, usually with a spot meter (not incident metering) to assess the absolute values of the shadows and the relative values of the highlights.

The Zone System is a way to systematize that process. Through testing, one can develop sets of exposure/development combinations for various films that will accommodate various contrast ranges such that they can be printed on a standard paper. The “real” Zone System is an image-by-image thing, and is really only suitable for sheet film (or rolls that are shot entirely under one set of conditions); the “standard operating procedure” for roll-film shooters was to find a good N-1 recipe and rely on paper contrast grade changes to make up the difference between negatives.

As with HDR, though, that results in a job half done. It’s really nice that you managed to get everything into one image, but the result is flat and uninteresting until it is tone-mapped. (And it really is; see Chip Forelli’s B&H Event Space presentation Straight Print to Finished Print: the Untold Story for a lot more info.) That’s where dodging and burning come in — one needs to put back all of the interesting details that creating a low-contrast image minimized. That, of course, is a lot of work — work you can lessen quite a bit by combining the Zone System with selective colour filtration and graduated/split ND filters at capture time.

Colour film changed the game again. Not only does it have (mostly) inherently lower latitude than panchromatic B&W, it is also much more prone to reciprocity failure. This isn’t the simple reciprocity failure of B&W film, where you need to make long exposures even longer. Anyone can cope with that, and long exposures with colour film are not much more complicated than with B&W film. No, there’s a complex interplay between the silver and colour developers, along with the differing depths and thicknesses of the colour emulsions, that mean that there is only a small range of development times where the relationships between the various colours is even close to workable. For slide films, a one-stop push or pull is drastic and already starting to show colour shifts. For colour negatives, you start running into unfixable colour shifts at about 1 1/3 stops over and 1 2/3 stops under (depending on the film; “consumer” Kodaks were better-behaved but had strikes against them in other areas). And even when you could get the contrast right, pushing and pulling would do things to saturation that might not fit the image.

So how did we handle contrast with colour? Well, we started by choosing the right film for the job. A wedding photographer, for instance, would gravitate towards something like Kodak’s Vericolor III Professional (VPS), which had a wide latitude and low saturation, and could (if used carefully) capture both the bride’s dress and the groom’s tux comfortably and render good skin tones. But VPS would result in a pretty bland landscape. So we used films with a bit more saturation and “punch”, often picking different films for different circumstances (you couldn’t top Kodachrome for fall foliage, but Fuji’s Velvia had it beat six ways from Sunday for lush spring vegetation). We used split/graduated ND filters where they made sense. Since printing upped the contrast again (especially for Cibachromes/Ilfochromes made from transparencies) we’d use contrast masking to knock it back down again when it was appropriate. And — perhaps most importantly — we learned to make strategic sacrifices when they made sense. If blacks had to block up or whites had to blow out to make the best picture, that’s what we did. It wasn’t a tragedy in those days. (I’m not convinced it’s a tragedy today either.)

smtp – Accessing incoming emails on multiple domains in a single account/panel

I want to view incoming emails on multiple email-addresses, and multiple domains – using a single control panel / web interface. I am only interested in incoming emails – not sending emails in this use case. What is the easiest way that allows one to read all incoming emails on a VPS – in a single webmail account?

I tried mailinabox but seems you need separate accounts for separate domains.

central limit theorem – Sampling from multiple (exponential) distributions at once

Let’s say we have $N$ continuous random variables $X_i sim Exp(?)$. If we take $M$ samples from each $X_i$ and put them all together, what distribution should we expect to observe? Exponential, normal, or something else? I’m not sure if the CLT applies here, since we are not summing anything.

python – How to write multiple lines of ‘if’ code in one line(duplicate)?

Coming straight to the point, I want to write the following if statement in one line like if True:a=5(the if statement has only one line of code):

if a>5:
    a=5
    print("a=5"

(This question is a duplicate of the same question I asked which was closed so I “ask(ed) a new one”)

file permission: one user with multiple permission types

The situation I thought of is, that one user get’s two links with different types of permission for the same file (didn’t find a satisfying answer yet):

  • Link A: read-only
  • Link B: full access

Now if the user opens the file with Link A, what is he able to do?

  • just view the file
    or
  • edit it because the 2nd permission is stronger?

uploads – Flat media folder vs multiple directories

I recently took over a website that uses a flat media folder in the site root. Is there a benefit to that over using the standard WordPress media folder structure of uploads/year/month/file?

Not particularly, mostly preference. Some people might do it thinking it enhances SEO, but I’ve seen no evidence to support that claim.

My guess was that it takes a long time to index a single directory with a ton of files than it does to index the standard structure.

This sounds plausible, but you shouldn’t need to access this folder via FTP. Remember, the media library is not a file/folder viewer. Uploading things to the uploads folder doesn’t make them appear in the media library, and deleting things in that folder does not remove them, it just creates broken images.

This is because when you upload a file it’s represented in the database as a post of type attachment, and it’s those attachments that are listed in the media library. They have post meta, post parents, their own template and URLs, and can even have comments if you add the comment functions to their templates

At various times, we have been unable to upload images and, when we can upload images, it goes slowly.

This could be due to the flat folder layout, but that’s less likely. You would need to profile an upload using the simple uploader rather than the drag and drop. You would do this via a tool such as XDebug, or the query monitor plugin. Right now you do not have enough information to draw a conclusion and it could be many things.

multiple monitors – Strange behaviour of external display

I have a notebook connected to a second monitor via displayport. The OS is Linux Mint 20, 100% up-to-date. When I start it, the login window comes up and only the notebook display is on. I then wait a few seconds, log out, and exactly when the new login appears, both displays are mirrored (i.e. the external display shows the same contents with a tiled background). As soon as I log in for the second time, the primary display is extended by the second one, and that’s the mode I want to have.

Any ideas what might cause this oddity?

My thoughts so far: It seems as if during the starting process of the desktop environment two different configurations are involved and that there is some kind of a race condition. I have went through all the scripts I could find in /etc/, but I didn’t find anything pointing in the right direction. My biggest problem here is: When I started using Linux and Solaris heavily at the end of the 1990 until maybe about 2010 at the latest, things were different with respect to System V and the whole startup process. Now we have systemd and I’m totally new to that. Moreover, there are libraries on my computer regarding Gnome, although I don’t use it. I’d wish to stay with XFCE4. So any hints regarding the architecture or the mere order of processes/scripts involved from launching X11 to the appearance XFCE4 desktop would help!

Thanks a lot!

transit – Do I have to collect my bags if I have multiple layovers?

Each country has different rules. The US does not have the concept of “transit passenger” and you will have to enter the US by going through immigration and customs. You may or may not need to go through security again. A couple of hours should be okay.

In Auckland, you do not have to enter NZ (that would currently require quarantine for COVID-19), so your bags may be checked through to Brisbane. In that case you would only need to hang around in the transit area until your next flight leaves.

The best advice is to ask the at the check-in counter when you check in. They will be able to tell you.