How does what companies produce and sell factor in GDP? The usual GDP formula is 

$$GDP = C + I + G + (X-M)$$

But suppose I am a company and I produce some goods $q$ which I sell at a price $p$. Suppose also I don't know how much of the units actually get sold. 

How do I include this information into the GDP equation?
This formula of GDP is an expenditure approach, which classify the country's output by category of final consumers. Therefore, you should determine who demands your product (ie who spends money to purchase your production): If $q_C$ is consumed by households, $q_I$ by firms, $q_G$ by the Government and $q_X$ is exported, then your new GDP is:

$$ GDP' = C \times p\cdot q_C + I\times p\cdot q_I + G\times p\cdot q_G + ( X\times p\cdot q_X - M) $$