The book of Ecclesiastes is a fine piece of inspired literary work, carefully crafted to convey an important message about the quest for the meaning of life. There is a Narrator who frames this royal story (1:1-11 and 12:8-14), a story which is made up of the actual words and thoughts of someone we will refer to as the Quester (1:12 – 12:7). The Quester is also called the Preacher, the Teacher, the Wise Man or Qohelet (Hebrew for 'preacher’).
Solomon is the stated identity of the Quester (1:1) but some biblical scholars now choose a later date and see this as royal Solomonic fiction, though based on actual historical experiences. See Craig G. Bartholomew's excellent commentary on Ecclesiastes in the Baker Commentary on the Old Testament Wisdom and Psalms series (Tremper Longman III, Editor) for more background detail.
The theme of the book is stated loud and clear right up front (1:2) – "Utterly enigmatic, utterly enigmatic, everything is enigmatic.” This Hebrew word hebel is used 38 times in the book and can be translated as vanity, absurdity, futility, transience, uselessness, vapor/breath, chasing the wind, and meaninglessness. Enigmatic or 'chasing after the wind' are alternative translations. 
This provocative summary of the Quester's search for meaning (his epistemology) is shocking coming from the ruler of God's people (1:1), but anticipates the journey he will embark on and the conclusions he will come to. He is talking about human life and experience (anthropology), not God and or the universe in general (cosmology). This summary statement does not close the debate but rather opens it – the shock of the statement engages the reader in the Quester's own struggle as they begin to wrestle with how a wise person akin to Solomon could make this sort of statement. 
After stating the theme of the book, the key question being pursued is presented (1:3) - "What is the benefit for humankind in all one's labor at which one labors under the sun?"
The word translated “benefit” is used 10 times in the book and refers to advantage, profit, benefit, additional edge, or meaning for our labor (work). The word “humankind” is used 49 times and shows how the pursuit is about fundamental questions about the nature of human existence. The phrase “under the sun” is used 29 times, showing the Quester’s concern with the whole range of the human experience. The word “labor” is used 22 times and "to labor" 13 times, referring to work, toil, labor, struggle and pain – all sorts of human endeavor.
Although this is the main question being pursued, there are actually 32 questions in the book of Ecclesiastes. That’s 12% of the book’s entire content! Questions drive the intellectual challenge, inviting the reader to participate in the struggle to find the meaning of life. Never be afraid to question. 
The Quester considers all of life under the sun. Here is a brief overview of his quest:
  • Pleasure and the good life (2:1-11) – abandoning himself to the pleasures of wine, extensive building projects, gardens and parks, the accumulation of wealth and treasures, music, sex, and so on.
  • The problem of death and one's legacy (2:12-23) – the repetitiveness of history, the end of life for all in death, and one's lack of control over one's legacy,
  • The mystery of time (3:1-15) – the limits of human life, namely birth and death, and the range of activities that make up human culture, including agriculture, war, reconciliation, medicine, grief, celebration, and so on.
  • The problem of injustice and death (3:16-22) – if death is just the end, then humans are no better than animals, and there will never be a time for judgment,
  • Four problems – oppression, rivalry as the motivation for work, isolation in work and life, and the problem of government (4:1-16).
  • Public worship (5:1-7).
  • Oppression and profit, along with its dangers (5:8-17).
  • The problem of riches and wealth (6:1-12).
  • Knowing what is good for one (7:1-13) – the nature of the good life.
  • Moderation in folly and wisdom (7:14-22).
  • The enigma of political rule (8:1-9).
  • The problem of delayed judgment (8:10-17) – including the lack of observable justice and the longevity of people favoring evil.
  • The fate of death and the gift of life (9:1-12).
  • The example of a city (9:13-18).
  • Wisdom, folly and rulers (10:1-20).
  • Living with the uncertainties of God's providence (11:1-6). 
There is no sacred/secular dualism here. It is a comprehensive survey of the variety of areas of human life and experience.