Modified from an earlier answer about the nature of identity and German unification
This is a trick question to answer as the issues of identity and nationality are seldom clear cut as popular understandings of nationalism hold them to be. But in the case of Austro-German identity, the major caesura was the defeat in the Second World War. Prior to 1945, the German dimension of Austrian identity existed in an indeterminate liminal zone in which self-identifying as German intersected with the various political contexts of the empire and republic.
The nature of Austrian Germanness after World War Two became somewhat more simplified because of the Cold War and the memory of the Third Reich. There were a number of pressures within Austria that constrained Austrian-German nationalism and channeled it into a particular direction. The Austrian State Treaty of 1955, which ended the Allied occupation had an official proviso that there would be no political union with Germany (East or West) and most of the Austrian political mainstream embraced this political division as a way to distance Austria from Großdeutsche sentiments and normalize Austria's relationship with the rest of Europe. This political narrative held Austria was held hostage by northern German extremists during the war and Austria was among the first victims of Nazism, and not a beneficiary or collaborator. This rejection of Germanness for an apolitical Austrian German identity blotted out the wide-ranging participation of Austrians in the Third Reich such as Odilo Globocnik, Kurt Waldheim, and of course, the Austrian-born Hitler himself. The alternative Austro-Germanism was a cozy Gemütlichkeit and emphasized the cultural contributions of Habsburg Austria to a wider European civilization, in contrast to Prussian-led militarism and its cold authoritarian technocracy. It should be added, this strategy of cordoning off the bad aspects of Germannes into a German other was not unique; many of the German Länder would argue their quaint regionalism was the antithesis of Prussia, and by extension, the Third Reich. In the case of Austria, this conceptual division fostered an amnesia about their actual position within the Third Reich. Denazification in Austria was anemic even by the lax standards set by the Adenauer administration. Some 90 percent of Austrian NSDAP members received amnesty and major Austrian political figures like Karl Renner argued that most Austrians were pressured into joining the party.
The situation of Austro-Germanness before 1938/45 is however much more complicated. The German population in the Austro-Hungarian Empire was a very heterogeneous both in character and demography. Although Imperial Germany was a much more diverse land than it is sometimes given credit for- some regions of the Ruhr were often known as Ruhr-Polen for all the Polish migrant laborers- the Dual Monarchy was far more variegated and Germans were only dominant only in the Cisleithanian core territories.
German nationalist activism within these territories often had to contend with the fact that the imperial state was ambivalent or sometimes outright hostile to nationalism as a political force. The Habsburgs positioned themselves as heads of a supranational dynasty and their state organization reflected this. Although earlier Habsburg emperors saw Germanization as a civilizing process for the empire's hinterlands, especially Joseph II, later emperors backed away from this sentiment. Emperor Franz-Joseph I allegedly said of a man whom his adviser said was a good Austrian patriot, "Ah yes, but is he a patriot for me!" Habsburg supranationalism had some degree of power within the empire, especially for its upper-classes and elites. One instructive example of this trend is an examination of the Mainz's imperial free knights who were left with no state after Napoleon's mediatization of the Archbishopric of Mainz. The nobles that remained within Germany tended to assimilate with the German upper-middle classes and articulated ideas about German national unification. In contrast, those knights that found employment under the Habsburgs eschewed German nationalism and styled themselves as a neofeudal transnational aristocracy.
So Austro-German nationalist activism had to contend with the salient fact that the monarchy was not a willing symbol for the German cultural nation within the empire. The result was that German nationalism often took multiple forms. In the metropolitan core around Vienna, the political mobilization of the German majority veered towards mass politics that had tinges of Großdeutsche nationalism and exclusionary rhetoric against outsiders. Some of this mass politics, such as Karl Lueger's Christian Socialism, stressed the Catholic nature of the Austro-Germans and pushed for the Habsburgs to be more pro- Austro-German, antiliberal, and antisocialist. In contrast, Georg Ritter von Schönerer advocated for pan-Germanism, but shared the Christian Socials' antisemitism and antisocialism. In regions where German speakers were a minority or shrinking, German activism was more flexible. In Bohemia, German activism during the first two-thirds of the nineteenth century was noticeably inclusive of acculturated Jews to bolster its numbers against the increasing stridency of the Czech national movement. There were attempts to create German colonies within the regions of the empire and promote Germandom in hinterlands. These colonization efforts often ran afoul of the fact that many of the colonists acculturated to their Slavic surroundings and their social practices often fused Germanness and with the culture of their neighbors.
This cultural hybridity is reflective of what historians of nationalism term "national amphibians," people who often chose nationality depending upon the circumstances. Cisleithanian Jews, for example, often were acculturated Germans, but felt greater political kinship with the ideals of the supranational Habsburg state or gravitated towards Herzl's Zionist movement because of the the rising antisemitism exemplified by Lueger's Christian Socials. In the case of the German colonists, they often brought up their children to be bilingual to better improve their opportunities later in life. Historians that have looked beyond the direct discourse of nationalist agitation and into the internal correspondence of nationalist groups have found such amphibians were not only present in large numbers, they were particularly vexing for these ideologues. This highlights a very important aspect of national identity in that its genesis is seldom clear-cut. Putting the blame on industrialization, mass politics, mass literacy, or Napoleon often minimizes human agency. This is not to say that those factors were unimportant, but when dealing with such a vital factor of human existence- identity- such minimization loses vital parts of the historical record.
Sources
Boyer, John W. Culture and Political Crisis in Vienna: Christian Socialism in Power, 1897-1918. Chicago: University of Chicago Press, 1995.
Cohen, Gary B. The Politics of Ethnic Survival: Germans in Prague, 1861-1914. Princeton, N.J.: Princeton University Press, 1981.
Godsey, William D. Nobles and Nation in Central Europe: Free Imperial Knights in the Age of Revolution, 1750-1850. Cambtidge: Cambridge University Press, 2004.
Judson, Pieter M. Guardians of the Nation: Activists on the Language Frontiers of Imperial Austria. Cambridge, Mass: Harvard University Press, 2006.
King, Jeremy. Budweisers into Czechs and Germans: A Local History of Bohemian Politics, 1848-1948. Princeton, N.J.: Princeton University Press, 2002.