Bocadillo and a side of chips/crisps on the house
with my order of beer at a Granada bar :b
Complimentary tapa with my order of beer
at a Madrid tapas bar :b
Free tapa with my order of clara con limon in another Madrid bar :)
For the first part of our Spain trip, my German friend and I ate together at every meal in which we partook. The afternoon after our visit to the Alhambra, she began to feel poorly and ended up taking to dining in the rooms of the hotels that we stayed in even on the days when she felt okay enough to venture out of the hotel to do such as visit a museum.
Going at it alone in terms of wandering about various city streets and checking out the sights, I also ended up dining alone for the bulk of the my second week in Spain. Sometimes I did so in actual restaurants but, more often than not, I would have my lunch and dinner in tapas bars -- which I found more comfortably informal and, also, had areas where single diners didn't stick out like a sore thumb so much in a part of the world where going out looks to be a pretty social affair.
The first time I ate out alone in Spain, I was presented with a complimentary tapa after I ordered my drink (a glass of local lager which really refreshed on a hot summer's day). When this happened again the next day, I chalked it down to Granada's reputation for being the only city left in Spain where patrons get given complimentary tapa whenever they order a drink (though it also was the case that at the eatery we dined in shortly after arriving in the city, my German friend and I did not get any free tapas with our drinks).
When I continued to get complimentary tapas after I ordered drinks at tapas bars in Madrid after we returned to the Spanish capital from our Andalucian sojourn, however, I realized there had to be more to this series of events. And while my German friend leapt to the conclusion that Spanish people were inclined to be more friendly to me when she (a dreaded German!) wasn't around, I reminded her that there was one evening during our first spell in Madrid where we had been served complimentary tapa at a tapas bar.
Looking back at that occasion and considering what it and all the subsequent times that I had been presented with free tapas had in common, I came to the realization that every time this occured, I had been seated at the counter or the nearby bar area (barro) rather than at a table further away (in what's called the mesa or salón in Spanish) or outside (terraza). At the same time, while it's supposed to help increase your chances of getting a tapa on the house if you order your drink first before placing your food order (rather than doing both at the same time or -- perish the thought! -- ordering your food before ordering your drink), I didn't find this to be as much of a factor with regards to the procurement of complimentary tapas as where I sat when I was in a bar!
I've read of people who favor paying for drinks but not food in Spanish bars. To my mind, this really only works if you're not really into food since you don't get choose to what tapas you're going to be given and what you're given on the house can vary quite a bit both in quality and quantity. (More than incidentally, my experience is that the quality of a complimentary tapa can be pretty indicative of the quality of the food you order at that bar/restaurant!) At the same time, I highly recommend eating at the counter of a tapas bar over the salón or terraza as you're more likely to have friendly interactions there with the staff and fellow customers.
A case in point: While seated at the counter one memorable evening at a newspaper-themed Madrid bar named El Diario, I wasn't only gifted tapas with each of the two beers I ordered but also offered slices of pineapple that the staff were sharing among themselves and patrons at the counter, and -- at the suggestion of a Spanish couple I had managed to strike up a bit of conversation with (despite my Spanish being on the minimal side and their English being the same way!) -- handed a slice of heavenly jamón ibérico de bellota to sample; and yes, I really do reckon that things would have been different if I had been seated in another area of the same establishment that night!